code: def to_image(tensor):
      """A convenience function to convert from a float dtype back to uint8"""
      im = tl.to_numpy(tensor)
      im -= im.min()
      im /= im.max()
      im *= 255
      return im.astype(np.uint8)
  
file_path: tensorly/examples/applications/plot_image_compression.py
imports: import matplotlib.pyplot
  import tensorly
  import numpy
  from scipy.misc import face
  from scipy.ndimage import zoom
  from tensorly.decomposition import parafac
  from tensorly.decomposition import tucker
  from math import ceil
label_desc: Use image node_id 1 for calling a global function with example usage: to_image(tensor) and returns: im