直接将tensor保存为图片

1、

./test.jpg地址为保存图片的地址,可以写自己工程中的地址
#save image
        vutils.save_image(pred,'data/sun/ref1.jpg',normalize = True)
        vutils.save_image(targets, 'data/sun/targets.jpg', normalize=True)

 

posted @ 2023-03-13 16:23  helloWorldhelloWorld  阅读(237)  评论(0)    收藏  举报