A pytorch re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network
GNU General Public License v3.0
462
stars
138
forks
source link
toplayer及之后的Conv2d和BatchNorm2d没有设置初始化方式? #62
Closed
Whu-wxy closed 4 years ago
看到whai362的代码中,以下代码是对于模型整体进行的初始化。 我看到这里只是在resnet参数初始化,resnet后面从toplayer到最后没有进行这样的初始化会不会导致结果较差?
if isinstance(m, nn.Conv2d): n = m.kernel_size[0] m.kernel_size[1] m.outchannels m.weight.data.normal(0, math.sqrt(2. / n)) elif isinstance(m, nn.BatchNorm2d): m.weight.data.fill(1) m.bias.data.zero()