pytorch numpy 转换成 tensor ——》 torch.from_numpy()

sub_ts = torch.from_numpy(sub_img) #sub_img为numpy类型

猜你喜欢

转载自blog.csdn.net/Hodors/article/details/120846867