停在断点处时,在控制台输入相关指令;
# debug时在console中查看tensor图像
image_tensor = target.cpu()
image_array = image_tensor.numpy()
from PIL import Image
image_PIL = Image.fromarray(image_array.astype('uint8'))
image_PIL.save("/home/wang/home/wang/aa.jpg")
停在断点处时,在控制台输入相关指令;
# debug时在console中查看tensor图像
image_tensor = target.cpu()
image_array = image_tensor.numpy()
from PIL import Image
image_PIL = Image.fromarray(image_array.astype('uint8'))
image_PIL.save("/home/wang/home/wang/aa.jpg")