File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
onnx_diagnostic/torch_models/hghub Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,18 @@ def _trygetattr(config, attname):
184184 return None
185185
186186
187+ def rewrite_architecture_name (name : Optional [str ]) -> Optional [str ]:
188+ if name == "ConditionalDETRForObjectDetection" :
189+ return "ConditionalDetrForObjectDetection"
190+ return name
191+
192+
187193def architecture_from_config (config ) -> Optional [str ]:
194+ """Guesses the architecture (class) of the model described by this config."""
195+ return rewrite_architecture_name (_architecture_from_config (config ))
196+
197+
198+ def _architecture_from_config (config ) -> Optional [str ]:
188199 """Guesses the architecture (class) of the model described by this config."""
189200 if isinstance (config , dict ):
190201 if "_class_name" in config :
Original file line number Diff line number Diff line change 55
66__date__ = "2025-06-21"
77
8- __data_arch_values__ = {"ResNetForImageClassification" : dict (image_size = 224 )}
8+ __data_arch_values__ = {
9+ "ConditionalDETRForObjectDetection" : dict (image_size = 224 ),
10+ "ResNetForImageClassification" : dict (image_size = 224 ),
11+ }
912
1013__data_arch__ = textwrap .dedent (
1114 """
You can’t perform that action at this time.
0 commit comments