提交 acf77701 编写于 作者: W wqz960

modify

上级 442d8410
...@@ -147,13 +147,12 @@ class GhostNet(): ...@@ -147,13 +147,12 @@ class GhostNet():
stdv = 1.0 / math.sqrt(squeeze.shape[1] * 1.0) stdv = 1.0 / math.sqrt(squeeze.shape[1] * 1.0)
excitation = fluid.layers.fc(input=squeeze, excitation = fluid.layers.fc(input=squeeze,
size=num_channels, size=num_channels,
act="hard_sigmoid", act=None,
param_attr=fluid.param_attr.ParamAttr( param_attr=fluid.param_attr.ParamAttr(
initializer=fluid.initializer.Uniform(-stdv, stdv), initializer=fluid.initializer.Uniform(-stdv, stdv),
name=name + '_2_weights'), name=name + '_2_weights'),
bias_attr=ParamAttr(name=name + '_2_offset')) bias_attr=ParamAttr(name=name + '_2_offset'))
#excitation = fluid.layers.clip(x=excitation, min=0, max=1) #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) se_scale = fluid.layers.elementwise_mul(x=input, y=excitation, axis=0)
return se_scale return se_scale
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册