关于将HRNet中的BN更换为GN之后出现的问题
Created by: lxk767363331
会出现以下的情况 dansh但是使用BN时不会,下面是我更改GN的代码与问题截图
gn_name = name + '_gn'
gn=paddle.fluid.layers.group_norm(input=conv,
groups=18,
param_attr=ParamAttr(name=gn_name + "_scale",
initializer=fluid.initializer.Constant(1.0)),
bias_attr=ParamAttr(name=gn_name + "_offset",
initializer=fluid.initializer.Constant(0.0)))
if if_act:
gn = fluid.layers.relu(gn)
return gn
# bn_name = name + '_bn'
# bn = fluid.layers.batch_norm(input=conv,
# param_attr=ParamAttr(name=bn_name + "_scale",
# initializer=fluid.initializer.Constant(1.0)),
# bias_attr=ParamAttr(name=bn_name + "_offset",
# initializer=fluid.initializer.Constant(0.0)),
# moving_mean_name=bn_name + '_mean',
# moving_variance_name=bn_name + '_variance')
# if if_act:
# bn = fluid.layers.relu(bn)
# return bn