将tensor转换为numpy
import tensor
import numpy as np
def tensor2img(tensor, out_type=np.uint8, min_max=...(0, 1)):
''' Converts a torch Tensor into an image Numpy array Input: 4D(B,(3/1),H,W), 3D(C,H,W), or...2D(H,W), any range, RGB channel order Output: 3D(H,W,C) or 2D(H,W), [0,255], np.uint8 (default) '''
if