pytorch tensor 数据类型转换

Y = torch.from_numpy(wipeAndPupil).to(X.device) # wipeAndPupil 从numpy转换为tensor
Y=Y.type(torch.cuda.FloatTensor)

你可能感兴趣的:(ML,pytorch,深度学习)