diff --git a/ppcls/arch/backbone/legendary_models/mobilenet_v1.py b/ppcls/arch/backbone/legendary_models/mobilenet_v1.py index 23e6b77e230e8bb3df9551ccb51d41bbf9a572cb..d0af0f3d57391a78f7099b3c7466c1abfbf5ba1d 100644 --- a/ppcls/arch/backbone/legendary_models/mobilenet_v1.py +++ b/ppcls/arch/backbone/legendary_models/mobilenet_v1.py @@ -141,7 +141,7 @@ class MobileNet(TheseusLayer): self.avg_pool = AdaptiveAvgPool2D(1) self.flatten = Flatten(start_axis=1, stop_axis=-1) - self.out = Linear( + self.fc = Linear( int(1024 * scale), class_num, weight_attr=ParamAttr(initializer=KaimingNormal())) @@ -151,7 +151,7 @@ class MobileNet(TheseusLayer): x = self.blocks(x) x = self.avg_pool(x) x = self.flatten(x) - x = self.out(x) + x = self.fc(x) return x