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(
3535 if self .head is not None :
3636 output = self .head (output )
3737
38- from mmcls .models .heads import MultiLabelClsHead
38+ from mmcls .models .heads import ConformerHead , MultiLabelClsHead
3939 if isinstance (self .head , MultiLabelClsHead ):
4040 output = torch .sigmoid (output )
41+ elif isinstance (self .head , ConformerHead ):
42+ output = F .softmax (torch .add (output [0 ], output [1 ]), dim = 1 )
4143 else :
4244 output = F .softmax (output , dim = 1 )
4345 return output
Original file line number Diff line number Diff line change @@ -228,3 +228,11 @@ models:
228228 - *pipeline_ort_static_fp32
229229 - convert_image : *convert_image
230230 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