File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
mmdeploy/codebase/mmcls/models/classifiers Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,11 @@ def base_classifier__forward(
35
35
if self .head is not None :
36
36
output = self .head (output )
37
37
38
- from mmcls .models .heads import MultiLabelClsHead
38
+ from mmcls .models .heads import ConformerHead , MultiLabelClsHead
39
39
if isinstance (self .head , MultiLabelClsHead ):
40
40
output = torch .sigmoid (output )
41
+ elif isinstance (self .head , ConformerHead ):
42
+ output = F .softmax (torch .add (output [0 ], output [1 ]), dim = 1 )
41
43
else :
42
44
output = F .softmax (output , dim = 1 )
43
45
return output
Original file line number Diff line number Diff line change @@ -228,3 +228,11 @@ models:
228
228
- *pipeline_ort_static_fp32
229
229
- convert_image : *convert_image
230
230
deploy_config : configs/mmcls/classification_tensorrt_dynamic-224x224-224x224.py
231
+
232
+ - name : Conformer
233
+ metafile : configs/conformer/metafile.yml
234
+ model_configs :
235
+ - configs/conformer/conformer-tiny-p16_8xb128_in1k.py
236
+ pipelines :
237
+ - *pipeline_ort_dynamic_fp32
238
+ - *pipeline_trt_dynamic_fp32
You can’t perform that action at this time.
0 commit comments