pytorch学习笔记(一)---创建Tensor的多种方法
一.创建Tensor的多种方法使用numpy创建import torchimport numpy as np#利用numpy创建a = np.array([1, 2])a_torch = torch.from_numpy(a)print(type(a), type(a_torch))输出<class ‘numpy.ndarray’> <class ‘torch...
转载
2019-05-31 21:37:09 ·
45664 阅读 ·
0 评论