摘要:
import torch from torch.autograd import Variable tensor =torch.FloatTensor([[1,2],[3,4]]) variable=Variable(tensor,requires_grad=True) print(tensor) p 阅读全文
posted @ 2020-05-19 10:13
--学无止境--
阅读(167)
评论(0)
推荐(0)
摘要:
import torch import numpy as np np_data=np.arange(6).reshape(2,3) torch_data=torch.from_numpy(np_data) tensor2array=torch_data.numpy() data=[-1,-1,2,- 阅读全文
posted @ 2020-05-19 09:51
--学无止境--
阅读(211)
评论(0)
推荐(0)

浙公网安备 33010602011771号