// Converting an image with depth = 1 to depth = 3, repeating the same values
// For some reason PIL complains when I want to save channel image as jpg without
// additional format in the .save()
im = np.repeat(im, 3, axis=0)
// Convert to values to range 1-255 and W,H, D
// A bandaid fix to an issue with gradcam
if im.shape[0] == 3 and np.max(im) == 1:
im = im.transpose(1, 2, 0) * 255