From aa8cf9ba04362e946b76d994800a27763977643a Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Fri, 28 May 2021 13:33:24 +0800 Subject: [PATCH] Update mobilenet_v1.py --- ppcls/arch/backbone/legendary_models/mobilenet_v1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppcls/arch/backbone/legendary_models/mobilenet_v1.py b/ppcls/arch/backbone/legendary_models/mobilenet_v1.py index 23e6b77e..d0af0f3d 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 -- GitLab