Y = torch.from_numpy(wipeAndPupil).to(X.device) # wipeAndPupil 从numpy转换为tensor Y=Y.type(torch.cuda.FloatTensor)
pytorch tensor 数据类型转换
最新推荐文章于 2023-11-07 04:20:54 发布
Y = torch.from_numpy(wipeAndPupil).to(X.device) # wipeAndPupil 从numpy转换为tensor Y=Y.type(torch.cuda.FloatTensor)