【Pytorch】normal_(), fill_(), index_fill(),nonzero(),index_select(),masked_fill(),torch.scatter()函数解读
1首先初始化一个矩阵shape(3,5)x=torch.zeros(3,5)x#输出tensor([[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.]])2x.normal_()x.normal_()#输出tensor([[-2.2073,0.2486,-1.9729,1.1014,1.0692],[-1.4998,0.2739,-1.6685,-