We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 90959e1 + 579a485 commit fe90379Copy full SHA for fe90379
algorithmic_efficiency/init_utils.py
@@ -13,6 +13,6 @@ def pytorch_default_init(module: nn.Module) -> None:
13
# Perform lecun_normal initialization.
14
fan_in, _ = nn.init._calculate_fan_in_and_fan_out(module.weight)
15
std = math.sqrt(1. / fan_in) / .87962566103423978
16
- nn.init.trunc_normal_(module.weight, std=std)
+ nn.init.trunc_normal_(module.weight, std=std, a=-2 * std, b=2 * std)
17
if module.bias is not None:
18
nn.init.constant_(module.bias, 0.)
0 commit comments