提交 1be9c16a 编写于 作者: T tianyi1997 提交者: HydrogenSulfate

Update BNNeck

上级 7a31d9a9
......@@ -36,12 +36,17 @@ class BNNeck(nn.Layer):
if 'bias_attr' in kwargs:
bias_attr = get_param_attr_dict(kwargs['bias_attr'])
use_global_stats = None
if 'use_global_stats' in kwargs:
use_global_stats = get_param_attr_dict(kwargs['use_global_stats'])
self.feat_bn = nn.BatchNorm1D(
num_features,
momentum=0.9,
epsilon=1e-05,
weight_attr=weight_attr,
bias_attr=bias_attr)
bias_attr=bias_attr,
use_global_stats=use_global_stats)
self.flatten = nn.Flatten()
......
......@@ -36,6 +36,7 @@ Arch:
Neck:
name: BNNeck
num_features: &feat_dim 2048
use_global_stats: True
Head:
name: "FC"
embedding_size: *feat_dim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册