Y = torch.from_numpy(wipeAndPupil).to(X.device) # wipeAndPupil 从numpy转换为tensor Y=Y.type(torch.cuda.FloatTensor)
pytorch tensor 数据类型转换
Guess you like
Origin blog.csdn.net/Hodors/article/details/120847374
Recommended
Ranking