Torch.new() vs torch.randn()


(manik ) #1

1

here how new() functions initialize value … is that like as randn() functions?


(Dien Hoa TRUONG) #2

With randn() you can set the value that follows some statistics (like mean 0, standard deviation 1). I think .new() doesn’t initialize values, it just set the memory depend on dtypes, and the values you got are just the trash previous values.