From 41b33c9e9ceb9eaf4bded26b5313ef903147c07e Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Thu, 5 Nov 2020 20:45:19 +0800 Subject: [PATCH] change KaimingNormal to KaimingUniform --- ppocr/modeling/heads/det_db_head.py | 4 ++-- ppocr/modeling/necks/db_fpn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ppocr/modeling/heads/det_db_head.py b/ppocr/modeling/heads/det_db_head.py index 23789910..49c50ffd 100644 --- a/ppocr/modeling/heads/det_db_head.py +++ b/ppocr/modeling/heads/det_db_head.py @@ -58,7 +58,7 @@ class Head(nn.Layer): stride=2, weight_attr=ParamAttr( name=name_list[2] + '.w_0', - initializer=paddle.nn.initializer.KaimingNormal()), + initializer=paddle.nn.initializer.KaimingUniform()), bias_attr=get_bias_attr(in_channels // 4, name_list[-1] + "conv2")) self.conv_bn2 = nn.BatchNorm( num_channels=in_channels // 4, @@ -78,7 +78,7 @@ class Head(nn.Layer): stride=2, weight_attr=ParamAttr( name=name_list[4] + '.w_0', - initializer=paddle.nn.initializer.KaimingNormal()), + initializer=paddle.nn.initializer.KaimingUniform()), bias_attr=get_bias_attr(in_channels // 4, name_list[-1] + "conv3"), ) diff --git a/ppocr/modeling/necks/db_fpn.py b/ppocr/modeling/necks/db_fpn.py index dbe482b4..02669e8a 100644 --- a/ppocr/modeling/necks/db_fpn.py +++ b/ppocr/modeling/necks/db_fpn.py @@ -26,7 +26,7 @@ class DBFPN(nn.Layer): def __init__(self, in_channels, out_channels, **kwargs): super(DBFPN, self).__init__() self.out_channels = out_channels - weight_attr = paddle.nn.initializer.KaimingNormal() + weight_attr = paddle.nn.initializer.KaimingUniform() self.in2_conv = nn.Conv2D( in_channels=in_channels[0], -- GitLab