diff --git a/ppcls/arch/__init__.py b/ppcls/arch/__init__.py index 34b3ef1bf46931def7017d202d3ebf431e16e035..4c4521bebb9661a801b4695f37c36b89caa07176 100644 --- a/ppcls/arch/__init__.py +++ b/ppcls/arch/__init__.py @@ -57,7 +57,8 @@ class RecModel(nn.Layer): x = self.backbone(x) if self.neck is not None: x = self.neck(x) - y = x if self.head is not None: y = self.head(x, label) + else: + y = None return {"features": x, "logits": y}