Update mobilenet_v1.py

This commit is contained in:
Bin Lu 2021-05-28 13:33:24 +08:00 committed by GitHub
parent f5ab94b4ed
commit aa8cf9ba04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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