1、加法运算A=torch.arange(20,dtype=torch.float32).reshape(5,4)B=A.clone()#通过分配新内存,将A的一个副本分配给BA,A+B#tensor([[0.,1.,2.,3.],#[4.,5.,6.,7.],#[8.,9.,10.,11.],#[12.,13.,14.,15.],#[16.,17.,18.,19.]]),#tensor([[0.,2.,4.,6.],#[8.,10.,12.,14.],#[16.,18.,20.,22.],#[24.,26.,28.,30.],#[32.,34.,36.,38.]])2、乘法运算A*B#ten