From acf77701bde73293f89d736308004f198782dd5c Mon Sep 17 00:00:00 2001 From: wqz960 <362379625@qq.com> Date: Sun, 28 Jun 2020 04:56:43 +0000 Subject: [PATCH] modify --- ppcls/modeling/architectures/ghostnet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppcls/modeling/architectures/ghostnet.py b/ppcls/modeling/architectures/ghostnet.py index cd5546a7..8f9c54b6 100644 --- a/ppcls/modeling/architectures/ghostnet.py +++ b/ppcls/modeling/architectures/ghostnet.py @@ -147,13 +147,12 @@ class GhostNet(): stdv = 1.0 / math.sqrt(squeeze.shape[1] * 1.0) excitation = fluid.layers.fc(input=squeeze, size=num_channels, - act="hard_sigmoid", + act=None, param_attr=fluid.param_attr.ParamAttr( initializer=fluid.initializer.Uniform(-stdv, stdv), name=name + '_2_weights'), bias_attr=ParamAttr(name=name + '_2_offset')) #excitation = fluid.layers.clip(x=excitation, min=0, max=1) - print("using hardsigmoid") se_scale = fluid.layers.elementwise_mul(x=input, y=excitation, axis=0) return se_scale -- GitLab