From e36afbf458e67d1c770832aa0135d4c4e20a2e9f Mon Sep 17 00:00:00 2001 From: shijianjian Date: Thu, 5 Sep 2024 21:16:01 +0300 Subject: [PATCH] update --- kornia/contrib/models/rt_detr/architecture/rtdetr_head.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kornia/contrib/models/rt_detr/architecture/rtdetr_head.py b/kornia/contrib/models/rt_detr/architecture/rtdetr_head.py index 23a343c18b..6345577e5a 100644 --- a/kornia/contrib/models/rt_detr/architecture/rtdetr_head.py +++ b/kornia/contrib/models/rt_detr/architecture/rtdetr_head.py @@ -276,7 +276,8 @@ def __init__( super().__init__() self.num_queries = num_queries # TODO: verify this is correct - assert len(in_channels) <= num_levels + if len(in_channels) > num_levels: + raise ValueError(f"`num_levels` cannot be greater than {len(in_channels)}. Got {num_levels}.") self.num_levels = num_levels # build the input projection layers