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/keras_tensorboard.py
imports: from __future__ import print_function
  import argparse
  import os
  import tempfile
  import numpy
  import tensorflow
  from tensorflow.keras import utils
  from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard
  from tensorflow.keras.datasets import mnist
  from tensorflow.keras.layers import Activation, Dense
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.optimizers import RMSprop
  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