code: def make_image(tensor):
      from PIL import Image
      import io
  
      tensor = np.stack((tensor, tensor, tensor), axis=2)
      height, width, channels = tensor.shape
      image = Image.fromarray(tensor)
      output = io.BytesIO()
      image.save(output, format="PNG")
      image_string = output.getvalue()
      output.close()
      return tf.Summary.Image(
          height=height,
          width=width,
          colorspace=channels,
          encoded_image_string=image_string,
      )
  
file_path: clearml/examples/frameworks/keras/legacy/keras_tensorboard.py
imports: from __future__ import print_function
  import argparse
  import tempfile
  import os
  import numpy
  from keras.callbacks import TensorBoard, ModelCheckpoint
  from keras.datasets import mnist
  from keras.models import Sequential
  from keras.layers.core import Dense, Activation
  from keras.optimizers import RMSprop
  from keras.utils import np_utils
  import tensorflow
  from clearml import Task
label_desc: Use image node_id 1 for calling the TensorBoardImage obj's underlying member method code with example usage: obj.make_image(tensor) and returns: tf