Revert unresolved changes in Bias initialization

it should be zeros_ or parameterized in future properly.
This commit is contained in:
AngelBottomless
2022-10-27 14:44:53 +09:00
committed by GitHub
parent cc56df996e
commit 029d7c7543

View File

@@ -75,7 +75,7 @@ class HypernetworkModule(torch.nn.Module):
w, b = layer.weight.data, layer.bias.data w, b = layer.weight.data, layer.bias.data
if weight_init == "Normal" or type(layer) == torch.nn.LayerNorm: if weight_init == "Normal" or type(layer) == torch.nn.LayerNorm:
normal_(w, mean=0.0, std=0.01) normal_(w, mean=0.0, std=0.01)
normal_(b, mean=0.0, std=0.005) normal_(b, mean=0.0, std=0)
elif weight_init == 'XavierUniform': elif weight_init == 'XavierUniform':
xavier_uniform_(w) xavier_uniform_(w)
zeros_(b) zeros_(b)