未验证 提交 3d669f97 编写于 作者: W wangguanzhong 提交者: GitHub

fix pafnet_lite (#3196)

上级 d585c310
...@@ -18,6 +18,7 @@ TrainReader: ...@@ -18,6 +18,7 @@ TrainReader:
shuffle: true shuffle: true
drop_last: true drop_last: true
use_shared_memory: true use_shared_memory: true
cutmix_epoch: 200
EvalReader: EvalReader:
sample_transforms: sample_transforms:
......
...@@ -86,11 +86,13 @@ class HMHead(nn.Layer): ...@@ -86,11 +86,13 @@ class HMHead(nn.Layer):
head_conv.add_sublayer(name + '.act', nn.ReLU()) head_conv.add_sublayer(name + '.act', nn.ReLU())
self.feat = head_conv self.feat = head_conv
bias_init = float(-np.log((1 - 0.01) / 0.01)) bias_init = float(-np.log((1 - 0.01) / 0.01))
weight_attr = None if lite_head else ParamAttr(initializer=Normal(0,
0.01))
self.head = nn.Conv2D( self.head = nn.Conv2D(
in_channels=ch_out, in_channels=ch_out,
out_channels=num_classes, out_channels=num_classes,
kernel_size=1, kernel_size=1,
weight_attr=ParamAttr(initializer=Normal(0, 0.01)), weight_attr=weight_attr,
bias_attr=ParamAttr( bias_attr=ParamAttr(
learning_rate=2., learning_rate=2.,
regularizer=L2Decay(0.), regularizer=L2Decay(0.),
...@@ -160,12 +162,14 @@ class WHHead(nn.Layer): ...@@ -160,12 +162,14 @@ class WHHead(nn.Layer):
learning_rate=2., regularizer=L2Decay(0.)))) learning_rate=2., regularizer=L2Decay(0.))))
head_conv.add_sublayer(name + '.act', nn.ReLU()) head_conv.add_sublayer(name + '.act', nn.ReLU())
weight_attr = None if lite_head else ParamAttr(initializer=Normal(0,
0.01))
self.feat = head_conv self.feat = head_conv
self.head = nn.Conv2D( self.head = nn.Conv2D(
in_channels=ch_out, in_channels=ch_out,
out_channels=4, out_channels=4,
kernel_size=1, kernel_size=1,
weight_attr=ParamAttr(initializer=Normal(0, 0.001)), weight_attr=weight_attr,
bias_attr=ParamAttr( bias_attr=ParamAttr(
learning_rate=2., regularizer=L2Decay(0.))) learning_rate=2., regularizer=L2Decay(0.)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册