import torch
mean = torch.tensor([10,20,30],dtype=torch.float32)
a = torch.normal(mean, 1.0) #均值分别为[10,20,30], std=1, size与均值保持一致
b = torch.randn(2,3) #标准正态分布 mean=0, std=1, size=(2,3)
c = torch.rand(1,3) #区间[0,1)随机采样,size=(1,3)
d = torch.randint(5,10,(1,5)) #区间[5,10)随机采样整数, size=(1,5)
e = torch.randperm(5) #生成0到n-1的随机排序