python代码转换为pytorch_python – Pytorch:将FloatTensor转换为DoubleTensor
我有2个numpy数组,我将其转换为张量以使用TensorDataset对象.importtorch.utils.dataasdata_utilsX=np.zeros((100,30))Y=np.zeros((100,30))train=data_utils.TensorDataset(torch.from_numpy(X).double(),torch.from_numpy(Y))train_l