We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37699e4 commit e36afbfCopy full SHA for e36afbf
1 file changed
kornia/contrib/models/rt_detr/architecture/rtdetr_head.py
@@ -276,7 +276,8 @@ def __init__(
276
super().__init__()
277
self.num_queries = num_queries
278
# TODO: verify this is correct
279
- assert len(in_channels) <= num_levels
+ if len(in_channels) > num_levels:
280
+ raise ValueError(f"`num_levels` cannot be greater than {len(in_channels)}. Got {num_levels}.")
281
self.num_levels = num_levels
282
283
# build the input projection layers
0 commit comments