未验证 提交 2b156739 编写于 作者: W Wu Yi 提交者: GitHub

Merge pull request #1643 from typhoonzero/fix_previous_bug

fix previous merge bug
...@@ -142,7 +142,6 @@ class AlexNet(): ...@@ -142,7 +142,6 @@ class AlexNet():
out = fluid.layers.fc( out = fluid.layers.fc(
input=fc7, input=fc7,
size=class_dim, size=class_dim,
act='softmax',
bias_attr=fluid.param_attr.ParamAttr( bias_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, stdv)), initializer=fluid.initializer.Uniform(-stdv, stdv)),
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
......
...@@ -94,7 +94,6 @@ class DPN(object): ...@@ -94,7 +94,6 @@ class DPN(object):
initializer=fluid.initializer.Uniform(-stdv, stdv)) initializer=fluid.initializer.Uniform(-stdv, stdv))
fc6 = fluid.layers.fc(input=pool5, fc6 = fluid.layers.fc(input=pool5,
size=class_dim, size=class_dim,
act='softmax',
param_attr=param_attr) param_attr=param_attr)
return fc6 return fc6
......
...@@ -47,7 +47,6 @@ class InceptionV4(): ...@@ -47,7 +47,6 @@ class InceptionV4():
out = fluid.layers.fc( out = fluid.layers.fc(
input=drop, input=drop,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, stdv))) initializer=fluid.initializer.Uniform(-stdv, stdv)))
return out return out
......
...@@ -120,7 +120,6 @@ class MobileNet(): ...@@ -120,7 +120,6 @@ class MobileNet():
output = fluid.layers.fc(input=input, output = fluid.layers.fc(input=input,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr(initializer=MSRA())) param_attr=ParamAttr(initializer=MSRA()))
return output return output
......
...@@ -73,7 +73,6 @@ class MobileNetV2(): ...@@ -73,7 +73,6 @@ class MobileNetV2():
output = fluid.layers.fc(input=input, output = fluid.layers.fc(input=input,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr(initializer=MSRA())) param_attr=ParamAttr(initializer=MSRA()))
return output return output
......
...@@ -60,7 +60,6 @@ class ResNet(): ...@@ -60,7 +60,6 @@ class ResNet():
stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0) stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0)
out = fluid.layers.fc(input=pool, out = fluid.layers.fc(input=pool,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, initializer=fluid.initializer.Uniform(-stdv,
stdv))) stdv)))
......
...@@ -62,7 +62,6 @@ class DistResNet(): ...@@ -62,7 +62,6 @@ class DistResNet():
stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0) stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0)
out = fluid.layers.fc(input=pool, out = fluid.layers.fc(input=pool,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, initializer=fluid.initializer.Uniform(-stdv,
stdv), stdv),
......
...@@ -110,7 +110,6 @@ class SE_ResNeXt(): ...@@ -110,7 +110,6 @@ class SE_ResNeXt():
stdv = 1.0 / math.sqrt(drop.shape[1] * 1.0) stdv = 1.0 / math.sqrt(drop.shape[1] * 1.0)
out = fluid.layers.fc(input=drop, out = fluid.layers.fc(input=drop,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, initializer=fluid.initializer.Uniform(-stdv,
stdv))) stdv)))
......
...@@ -93,7 +93,6 @@ class ShuffleNetV2(): ...@@ -93,7 +93,6 @@ class ShuffleNetV2():
output = fluid.layers.fc(input=pool_last, output = fluid.layers.fc(input=pool_last,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr(initializer=MSRA())) param_attr=ParamAttr(initializer=MSRA()))
return output return output
......
...@@ -64,7 +64,6 @@ class VGGNet(): ...@@ -64,7 +64,6 @@ class VGGNet():
out = fluid.layers.fc( out = fluid.layers.fc(
input=fc2, input=fc2,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Normal(scale=0.005)), initializer=fluid.initializer.Normal(scale=0.005)),
bias_attr=fluid.param_attr.ParamAttr( bias_attr=fluid.param_attr.ParamAttr(
......
...@@ -159,7 +159,6 @@ class AlexNet(): ...@@ -159,7 +159,6 @@ class AlexNet():
out = fluid.layers.fc( out = fluid.layers.fc(
input=fc7, input=fc7,
size=class_dim, size=class_dim,
act='softmax',
bias_attr=fluid.param_attr.ParamAttr( bias_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, stdv), initializer=fluid.initializer.Uniform(-stdv, stdv),
name=layer_name[7] + "_offset"), name=layer_name[7] + "_offset"),
......
...@@ -122,7 +122,6 @@ class DPN(object): ...@@ -122,7 +122,6 @@ class DPN(object):
initializer=fluid.initializer.Uniform(-stdv, stdv)) initializer=fluid.initializer.Uniform(-stdv, stdv))
fc6 = fluid.layers.fc(input=pool5, fc6 = fluid.layers.fc(input=pool5,
size=class_dim, size=class_dim,
act='softmax',
param_attr=param_attr, param_attr=param_attr,
name="fc6") name="fc6")
......
...@@ -48,7 +48,6 @@ class InceptionV4(): ...@@ -48,7 +48,6 @@ class InceptionV4():
out = fluid.layers.fc( out = fluid.layers.fc(
input=drop, input=drop,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr( param_attr=ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, stdv), initializer=fluid.initializer.Uniform(-stdv, stdv),
name="final_fc_weights"), name="final_fc_weights"),
......
...@@ -130,7 +130,6 @@ class MobileNet(): ...@@ -130,7 +130,6 @@ class MobileNet():
output = fluid.layers.fc(input=input, output = fluid.layers.fc(input=input,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr( param_attr=ParamAttr(
initializer=MSRA(), name="fc7_weights"), initializer=MSRA(), name="fc7_weights"),
bias_attr=ParamAttr(name="fc7_offset")) bias_attr=ParamAttr(name="fc7_offset"))
......
...@@ -80,7 +80,6 @@ class MobileNetV2(): ...@@ -80,7 +80,6 @@ class MobileNetV2():
output = fluid.layers.fc(input=input, output = fluid.layers.fc(input=input,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr(name='fc10_weights'), param_attr=ParamAttr(name='fc10_weights'),
bias_attr=ParamAttr(name='fc10_offset')) bias_attr=ParamAttr(name='fc10_offset'))
return output return output
......
...@@ -74,7 +74,6 @@ class ResNet(): ...@@ -74,7 +74,6 @@ class ResNet():
stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0) stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0)
out = fluid.layers.fc(input=pool, out = fluid.layers.fc(input=pool,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, initializer=fluid.initializer.Uniform(-stdv,
stdv))) stdv)))
......
...@@ -123,7 +123,6 @@ class SE_ResNeXt(): ...@@ -123,7 +123,6 @@ class SE_ResNeXt():
out = fluid.layers.fc( out = fluid.layers.fc(
input=drop, input=drop,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr( param_attr=ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, stdv), initializer=fluid.initializer.Uniform(-stdv, stdv),
name='fc6_weights'), name='fc6_weights'),
......
...@@ -97,7 +97,6 @@ class ShuffleNetV2(): ...@@ -97,7 +97,6 @@ class ShuffleNetV2():
output = fluid.layers.fc(input=pool_last, output = fluid.layers.fc(input=pool_last,
size=class_dim, size=class_dim,
act='softmax',
param_attr=ParamAttr( param_attr=ParamAttr(
initializer=MSRA(), name='fc6_weights'), initializer=MSRA(), name='fc6_weights'),
bias_attr=ParamAttr(name='fc6_offset')) bias_attr=ParamAttr(name='fc6_offset'))
......
...@@ -61,7 +61,6 @@ class VGGNet(): ...@@ -61,7 +61,6 @@ class VGGNet():
out = fluid.layers.fc( out = fluid.layers.fc(
input=fc2, input=fc2,
size=class_dim, size=class_dim,
act='softmax',
param_attr=fluid.param_attr.ParamAttr(name=fc_name[2] + "_weights"), param_attr=fluid.param_attr.ParamAttr(name=fc_name[2] + "_weights"),
bias_attr=fluid.param_attr.ParamAttr(name=fc_name[2] + "_offset")) bias_attr=fluid.param_attr.ParamAttr(name=fc_name[2] + "_offset"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册