直接将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)
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)