Torch.new() vs torch.randn()

1

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

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.

2 Likes