We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a348e2 commit 87691e4Copy full SHA for 87691e4
segmentation_models_pytorch/base/model.py
@@ -11,7 +11,9 @@ def __init__(self):
11
def initialize(self):
12
for m in self.modules():
13
if isinstance(m, nn.Conv2d):
14
- nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
+ nn.init.kaiming_uniform_(m.weight, mode='fan_in', nonlinearity='relu')
15
+ if m.bias is not None:
16
+ nn.init.constant_(m.bias, 0)
17
elif isinstance(m, nn.BatchNorm2d):
18
nn.init.constant_(m.weight, 1)
19
nn.init.constant_(m.bias, 0)
0 commit comments