list numpy tensor 转换
1 list 与 numpy
#numpy to list:
b = list(a) or b = a.tolist()
#list to numpy:
n = numpy.array(a)
2 numpy 与 tensor
#numpy to tensor:
b= torch.from_numpy(a)
#tensor to numpy:
b= a.numpy()
3 list 与 tensor
#list to tensor:
b= torch.Tensor(a)