mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
Update resnet.py
This commit is contained in:
parent
90321ce38d
commit
e6792d34da
@ -294,7 +294,7 @@ class ResNet(TheseusLayer):
|
||||
self.avg_pool_channels = self.num_channels[-1] * 2
|
||||
|
||||
stdv = 1.0 / math.sqrt(self.avg_pool_channels * 1.0)
|
||||
self.out = Linear(
|
||||
self.fc = Linear(
|
||||
self.avg_pool_channels,
|
||||
self.class_num,
|
||||
weight_attr=ParamAttr(
|
||||
@ -306,7 +306,7 @@ class ResNet(TheseusLayer):
|
||||
x = self.blocks(x)
|
||||
x = self.avg_pool(x)
|
||||
x = paddle.reshape(x, shape=[-1, self.avg_pool_channels])
|
||||
x = self.out(x)
|
||||
x = self.fc(x)
|
||||
return x
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user