Note that randn draws from a unit normal (Gaussian) distribution! It will also not be between -1,1 but just be in ~70% of all cases in this range.
torch::rand or torch.rand (without the trailing n) is for uniform distributed random numbers between 0…1