diff --git a/ppcls/arch/backbone/legendary_models/resnet.py b/ppcls/arch/backbone/legendary_models/resnet.py index ca75c2eaa4f2d7f4a604a312ed591c10811105c4..40bc563b7aa88cb53ab41b1db5f4201ad50c5a00 100644 --- a/ppcls/arch/backbone/legendary_models/resnet.py +++ b/ppcls/arch/backbone/legendary_models/resnet.py @@ -287,7 +287,8 @@ class ResNet(TheseusLayer): data_format="NCHW", input_image_channel=3, return_patterns=None, - return_stages=None): + return_stages=None, + **kargs): super().__init__() self.cfg = config diff --git a/ppcls/configs/Attr/StrongBaselineAttr.yaml b/ppcls/configs/Attr/StrongBaselineAttr.yaml index 7501669bc5707fa2577c7d0b573a3b23cd2a0213..2324015d667a09a56570677713792b16f1b2ed03 100644 --- a/ppcls/configs/Attr/StrongBaselineAttr.yaml +++ b/ppcls/configs/Attr/StrongBaselineAttr.yaml @@ -20,6 +20,7 @@ Arch: name: "ResNet50" pretrained: True class_num: 26 + infer_add_softmax: False # loss function config for traing/eval process Loss: @@ -110,5 +111,3 @@ DataLoader: Metric: Eval: - ATTRMetric: - - diff --git a/ppcls/engine/engine.py b/ppcls/engine/engine.py index ef24094c2b5214b1aa5811e3c1b28f33a6452c67..d4924b26309af356f23e6f6d19216694bc4cfdeb 100644 --- a/ppcls/engine/engine.py +++ b/ppcls/engine/engine.py @@ -457,7 +457,9 @@ class Engine(object): def export(self): assert self.mode == "export" - use_multilabel = self.config["Global"].get("use_multilabel", False) + use_multilabel = self.config["Global"].get( + "use_multilabel", + False) and not "ATTRMetric" in self.config["Metric"]["Eval"][0] model = ExportModel(self.config["Arch"], self.model, use_multilabel) if self.config["Global"]["pretrained_model"] is not None: load_dygraph_pretrain(model.base_model,