[mcj]Python中多维数组的理解
比如:b=torch.Tensor([1 , 2 , 3 , 4 , 5 , 6]) 此时数组为1维数组,我们把它变成2维数组:print(b.view(2,3)) 得到的结果是: tensor([[1., 2., 3.],[4., 5.,...
比如:b=torch.Tensor([1 , 2 , 3 , 4 , 5 , 6]) 此时数组为1维数组,我们把它变成2维数组:print(b.view(2,3)) 得到的结果是: tensor([[1., 2., 3.],[4., 5.,...