ToPILImage 则是将Tensor转化为PIL.Image。如果,我们要将Tensor转化为numpy,只需要使用.numpy() 即可。如下:. img_path = "./data/img_37.jpg" # transforms.
確定! 回上一頁