You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
""" Returns a tensor filled with random numbers from a normal distributionwith mean `0` and variance `1`"""torch.randn(3, 5)
############### output ###########################tensor([[ 0.1769, -2.0933, -0.8882, 0.0051, 0.9833],
[-0.6342, 0.4093, 0.6266, 0.3935, 0.2045],
[ 0.3055, -0.4522, -1.7044, 1.8426, 0.4553]])
I know MustRandn can solve this problem, but NewRandnInit as the default initialization method of Embedding will directly affect the initialization weights.
Is this a bug or is it designed this way for some reason?
The text was updated successfully, but these errors were encountered:
output
According to this line of code, when mean=0, all elements will be initialized with stdev
gotch/nn/init.go
Line 81 in 96b0967
This is different from PyTorch's randn function
I know MustRandn can solve this problem, but NewRandnInit as the default initialization method of Embedding will directly affect the initialization weights.
Is this a bug or is it designed this way for some reason?
The text was updated successfully, but these errors were encountered: