https://discuss.pytorch.org/t/random-number-on-gpu/9649/2
等價關(guān)系:
torch.rand(10, 10)
torch.FloatTensor(10, 10).uniform_()
torch.randn(10, 10)
torch.FloatTensor(10, 10).normal_()
torch.cuda.FloatTensor(10, 10).normal_()
就會在gpu上生成正太分布的隨機數(shù)违柏。