From 369797ca5ab1dfa72ce37f7487e0c9d9927c21a5 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Fri, 11 Jan 2019 13:12:21 +0800 Subject: [PATCH] fix previous merge bug --- fluid/PaddleCV/image_classification/models/alexnet.py | 1 - fluid/PaddleCV/image_classification/models/dpn.py | 1 - fluid/PaddleCV/image_classification/models/inception_v4.py | 1 - fluid/PaddleCV/image_classification/models/mobilenet.py | 1 - fluid/PaddleCV/image_classification/models/mobilenet_v2.py | 1 - fluid/PaddleCV/image_classification/models/resnet.py | 1 - fluid/PaddleCV/image_classification/models/resnet_dist.py | 1 - fluid/PaddleCV/image_classification/models/se_resnext.py | 1 - fluid/PaddleCV/image_classification/models/shufflenet_v2.py | 1 - fluid/PaddleCV/image_classification/models/vgg.py | 1 - fluid/PaddleCV/image_classification/models_name/alexnet.py | 1 - fluid/PaddleCV/image_classification/models_name/dpn.py | 1 - fluid/PaddleCV/image_classification/models_name/inception_v4.py | 1 - fluid/PaddleCV/image_classification/models_name/mobilenet.py | 1 - fluid/PaddleCV/image_classification/models_name/mobilenet_v2.py | 1 - fluid/PaddleCV/image_classification/models_name/resnet.py | 1 - fluid/PaddleCV/image_classification/models_name/se_resnext.py | 1 - fluid/PaddleCV/image_classification/models_name/shufflenet_v2.py | 1 - fluid/PaddleCV/image_classification/models_name/vgg.py | 1 - 19 files changed, 19 deletions(-) diff --git a/fluid/PaddleCV/image_classification/models/alexnet.py b/fluid/PaddleCV/image_classification/models/alexnet.py index 3e0eab2d..abe3b929 100644 --- a/fluid/PaddleCV/image_classification/models/alexnet.py +++ b/fluid/PaddleCV/image_classification/models/alexnet.py @@ -142,7 +142,6 @@ class AlexNet(): out = fluid.layers.fc( input=fc7, size=class_dim, - act='softmax', bias_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv)), param_attr=fluid.param_attr.ParamAttr( diff --git a/fluid/PaddleCV/image_classification/models/dpn.py b/fluid/PaddleCV/image_classification/models/dpn.py index ca49898f..316e96ac 100644 --- a/fluid/PaddleCV/image_classification/models/dpn.py +++ b/fluid/PaddleCV/image_classification/models/dpn.py @@ -94,7 +94,6 @@ class DPN(object): initializer=fluid.initializer.Uniform(-stdv, stdv)) fc6 = fluid.layers.fc(input=pool5, size=class_dim, - act='softmax', param_attr=param_attr) return fc6 diff --git a/fluid/PaddleCV/image_classification/models/inception_v4.py b/fluid/PaddleCV/image_classification/models/inception_v4.py index d3a80a20..15203754 100644 --- a/fluid/PaddleCV/image_classification/models/inception_v4.py +++ b/fluid/PaddleCV/image_classification/models/inception_v4.py @@ -47,7 +47,6 @@ class InceptionV4(): out = fluid.layers.fc( input=drop, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv))) return out diff --git a/fluid/PaddleCV/image_classification/models/mobilenet.py b/fluid/PaddleCV/image_classification/models/mobilenet.py index f3554734..d0b419e8 100644 --- a/fluid/PaddleCV/image_classification/models/mobilenet.py +++ b/fluid/PaddleCV/image_classification/models/mobilenet.py @@ -120,7 +120,6 @@ class MobileNet(): output = fluid.layers.fc(input=input, size=class_dim, - act='softmax', param_attr=ParamAttr(initializer=MSRA())) return output diff --git a/fluid/PaddleCV/image_classification/models/mobilenet_v2.py b/fluid/PaddleCV/image_classification/models/mobilenet_v2.py index 9ec118f2..c219b1bf 100644 --- a/fluid/PaddleCV/image_classification/models/mobilenet_v2.py +++ b/fluid/PaddleCV/image_classification/models/mobilenet_v2.py @@ -73,7 +73,6 @@ class MobileNetV2(): output = fluid.layers.fc(input=input, size=class_dim, - act='softmax', param_attr=ParamAttr(initializer=MSRA())) return output diff --git a/fluid/PaddleCV/image_classification/models/resnet.py b/fluid/PaddleCV/image_classification/models/resnet.py index 75c7b750..def99db6 100644 --- a/fluid/PaddleCV/image_classification/models/resnet.py +++ b/fluid/PaddleCV/image_classification/models/resnet.py @@ -60,7 +60,6 @@ class ResNet(): stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0) out = fluid.layers.fc(input=pool, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv))) diff --git a/fluid/PaddleCV/image_classification/models/resnet_dist.py b/fluid/PaddleCV/image_classification/models/resnet_dist.py index 2dab3e61..9aed8a98 100644 --- a/fluid/PaddleCV/image_classification/models/resnet_dist.py +++ b/fluid/PaddleCV/image_classification/models/resnet_dist.py @@ -62,7 +62,6 @@ class DistResNet(): stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0) out = fluid.layers.fc(input=pool, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv), diff --git a/fluid/PaddleCV/image_classification/models/se_resnext.py b/fluid/PaddleCV/image_classification/models/se_resnext.py index 023046a5..ac50bd87 100644 --- a/fluid/PaddleCV/image_classification/models/se_resnext.py +++ b/fluid/PaddleCV/image_classification/models/se_resnext.py @@ -110,7 +110,6 @@ class SE_ResNeXt(): stdv = 1.0 / math.sqrt(drop.shape[1] * 1.0) out = fluid.layers.fc(input=drop, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv))) diff --git a/fluid/PaddleCV/image_classification/models/shufflenet_v2.py b/fluid/PaddleCV/image_classification/models/shufflenet_v2.py index bc61508e..6db88aa7 100644 --- a/fluid/PaddleCV/image_classification/models/shufflenet_v2.py +++ b/fluid/PaddleCV/image_classification/models/shufflenet_v2.py @@ -93,7 +93,6 @@ class ShuffleNetV2(): output = fluid.layers.fc(input=pool_last, size=class_dim, - act='softmax', param_attr=ParamAttr(initializer=MSRA())) return output diff --git a/fluid/PaddleCV/image_classification/models/vgg.py b/fluid/PaddleCV/image_classification/models/vgg.py index 1af664fd..7f559982 100644 --- a/fluid/PaddleCV/image_classification/models/vgg.py +++ b/fluid/PaddleCV/image_classification/models/vgg.py @@ -64,7 +64,6 @@ class VGGNet(): out = fluid.layers.fc( input=fc2, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Normal(scale=0.005)), bias_attr=fluid.param_attr.ParamAttr( diff --git a/fluid/PaddleCV/image_classification/models_name/alexnet.py b/fluid/PaddleCV/image_classification/models_name/alexnet.py index 3dfaa25f..f063c4d6 100644 --- a/fluid/PaddleCV/image_classification/models_name/alexnet.py +++ b/fluid/PaddleCV/image_classification/models_name/alexnet.py @@ -159,7 +159,6 @@ class AlexNet(): out = fluid.layers.fc( input=fc7, size=class_dim, - act='softmax', bias_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv), name=layer_name[7] + "_offset"), diff --git a/fluid/PaddleCV/image_classification/models_name/dpn.py b/fluid/PaddleCV/image_classification/models_name/dpn.py index a39d9072..7f759b3b 100644 --- a/fluid/PaddleCV/image_classification/models_name/dpn.py +++ b/fluid/PaddleCV/image_classification/models_name/dpn.py @@ -122,7 +122,6 @@ class DPN(object): initializer=fluid.initializer.Uniform(-stdv, stdv)) fc6 = fluid.layers.fc(input=pool5, size=class_dim, - act='softmax', param_attr=param_attr, name="fc6") diff --git a/fluid/PaddleCV/image_classification/models_name/inception_v4.py b/fluid/PaddleCV/image_classification/models_name/inception_v4.py index 7b857d45..8c6c0dbb 100644 --- a/fluid/PaddleCV/image_classification/models_name/inception_v4.py +++ b/fluid/PaddleCV/image_classification/models_name/inception_v4.py @@ -48,7 +48,6 @@ class InceptionV4(): out = fluid.layers.fc( input=drop, size=class_dim, - act='softmax', param_attr=ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv), name="final_fc_weights"), diff --git a/fluid/PaddleCV/image_classification/models_name/mobilenet.py b/fluid/PaddleCV/image_classification/models_name/mobilenet.py index 2ac6b46a..d242bc94 100644 --- a/fluid/PaddleCV/image_classification/models_name/mobilenet.py +++ b/fluid/PaddleCV/image_classification/models_name/mobilenet.py @@ -130,7 +130,6 @@ class MobileNet(): output = fluid.layers.fc(input=input, size=class_dim, - act='softmax', param_attr=ParamAttr( initializer=MSRA(), name="fc7_weights"), bias_attr=ParamAttr(name="fc7_offset")) diff --git a/fluid/PaddleCV/image_classification/models_name/mobilenet_v2.py b/fluid/PaddleCV/image_classification/models_name/mobilenet_v2.py index 442bd67f..77d88c7d 100644 --- a/fluid/PaddleCV/image_classification/models_name/mobilenet_v2.py +++ b/fluid/PaddleCV/image_classification/models_name/mobilenet_v2.py @@ -80,7 +80,6 @@ class MobileNetV2(): output = fluid.layers.fc(input=input, size=class_dim, - act='softmax', param_attr=ParamAttr(name='fc10_weights'), bias_attr=ParamAttr(name='fc10_offset')) return output diff --git a/fluid/PaddleCV/image_classification/models_name/resnet.py b/fluid/PaddleCV/image_classification/models_name/resnet.py index 095bd155..19fa4ff2 100644 --- a/fluid/PaddleCV/image_classification/models_name/resnet.py +++ b/fluid/PaddleCV/image_classification/models_name/resnet.py @@ -74,7 +74,6 @@ class ResNet(): stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0) out = fluid.layers.fc(input=pool, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv))) diff --git a/fluid/PaddleCV/image_classification/models_name/se_resnext.py b/fluid/PaddleCV/image_classification/models_name/se_resnext.py index e083c524..0ae3d66f 100644 --- a/fluid/PaddleCV/image_classification/models_name/se_resnext.py +++ b/fluid/PaddleCV/image_classification/models_name/se_resnext.py @@ -123,7 +123,6 @@ class SE_ResNeXt(): out = fluid.layers.fc( input=drop, size=class_dim, - act='softmax', param_attr=ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv), name='fc6_weights'), diff --git a/fluid/PaddleCV/image_classification/models_name/shufflenet_v2.py b/fluid/PaddleCV/image_classification/models_name/shufflenet_v2.py index 1cd4767e..595debf2 100644 --- a/fluid/PaddleCV/image_classification/models_name/shufflenet_v2.py +++ b/fluid/PaddleCV/image_classification/models_name/shufflenet_v2.py @@ -97,7 +97,6 @@ class ShuffleNetV2(): output = fluid.layers.fc(input=pool_last, size=class_dim, - act='softmax', param_attr=ParamAttr( initializer=MSRA(), name='fc6_weights'), bias_attr=ParamAttr(name='fc6_offset')) diff --git a/fluid/PaddleCV/image_classification/models_name/vgg.py b/fluid/PaddleCV/image_classification/models_name/vgg.py index ac26791a..8fcd2d9f 100644 --- a/fluid/PaddleCV/image_classification/models_name/vgg.py +++ b/fluid/PaddleCV/image_classification/models_name/vgg.py @@ -61,7 +61,6 @@ class VGGNet(): out = fluid.layers.fc( input=fc2, size=class_dim, - act='softmax', param_attr=fluid.param_attr.ParamAttr(name=fc_name[2] + "_weights"), bias_attr=fluid.param_attr.ParamAttr(name=fc_name[2] + "_offset")) -- GitLab