in_stats = ( (0.485, 0.456, 0.406), (0.229, 0.224, 0.225) )
image = torch.load("mysteryman.pt")
image = (image * torch.tensor(in_stats[1])[:,None,None])
image += torch.tensor(in_stats[0])[:,None,None]
image.rgb
def chans(
x:Tensor, # Input, shape=([...], H, W)
cmap:str='twilight', # Use matplotlib colormap by this name
cm_below:str='blue', # Color for values below -1
cm_above:str='red', # Color for values above 1
cm_ninf:str='cyan', # Color for -inf values
cm_pinf:str='fuchsia', # Color for +inf values
cm_nan:str='yellow', # Color for NaN values
view_width:int=966, # Try to produce an image at most this wide
gutter_px:int=3, # Draw write gutters when tiling the images
frame_px:int=1, # Draw black frame around each image
scale:int=1, cl:Any=False, ax:Optional=None
)->ChanProxy:
Map tensor values to colors. RGB[A] color is added as channel-last

