未验证 提交 e304a53d 编写于 作者: X xinyingxinying 提交者: GitHub

# add deform conv for fcos head(PaddlePaddle#54)

上级 a9db3f46
...@@ -67,6 +67,7 @@ def DeformConvNorm(input, ...@@ -67,6 +67,7 @@ def DeformConvNorm(input,
initializer=None, initializer=None,
bias_attr=False, bias_attr=False,
name=None): name=None):
assert norm_type in ['bn', 'sync_bn', 'affine_channel']
if bias_attr: if bias_attr:
bias_para = ParamAttr( bias_para = ParamAttr(
name=name + "_bias", name=name + "_bias",
...@@ -116,7 +117,7 @@ def DeformConvNorm(input, ...@@ -116,7 +117,7 @@ def DeformConvNorm(input,
name=norm_name + '_offset', name=norm_name + '_offset',
learning_rate=norm_lr * lr_scale, learning_rate=norm_lr * lr_scale,
regularizer=L2Decay(norm_decay)) regularizer=L2Decay(norm_decay))
if norm_type in ['bn', 'sync_bn']: if norm_type in ['bn', 'sync_bn']:
global_stats = True if freeze_norm else False global_stats = True if freeze_norm else False
out = fluid.layers.batch_norm( out = fluid.layers.batch_norm(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册