diff --git a/ppcls/engine/engine.py b/ppcls/engine/engine.py index 34edc1756a50797f4c5db8b1d15f25b46b56dda4..e43b198f5747ef6e52bb2d460f0f12f7d339e438 100644 --- a/ppcls/engine/engine.py +++ b/ppcls/engine/engine.py @@ -378,6 +378,7 @@ class ExportModel(nn.Layer): self.infer_output_key = config.get("infer_output_key", None) if self.infer_output_key == "features" and isinstance(self.base_model, RecModel): + self.base_model.head = IdentityHead() if config.get("infer_add_softmax", True): self.softmax = nn.Softmax(axis=-1) else: