Skip to content

Commit e36afbf

Browse files
committed
update
1 parent 37699e4 commit e36afbf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kornia/contrib/models/rt_detr/architecture/rtdetr_head.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ def __init__(
276276
super().__init__()
277277
self.num_queries = num_queries
278278
# TODO: verify this is correct
279-
assert len(in_channels) <= num_levels
279+
if len(in_channels) > num_levels:
280+
raise ValueError(f"`num_levels` cannot be greater than {len(in_channels)}. Got {num_levels}.")
280281
self.num_levels = num_levels
281282

282283
# build the input projection layers

0 commit comments

Comments
 (0)