class_docstr: The user-facing class that provides metric storage functionalities.
  
  In the future we may add support for storing / logging other types of data if needed.
docstr: Add an `img_tensor` associated with `img_name`, to be shown on
  tensorboard.
  
  Args:
      img_name (str): The name of the image to put into tensorboard.
      img_tensor (torch.Tensor or numpy.array): An `uint8` or `float`
          Tensor of shape `[channel, height, width]` where `channel` is
          3. The image format should be RGB. The elements in img_tensor
          can either have values in [0, 1] (float32) or [0, 255] (uint8).
          The `img_tensor` will be visualized in tensorboard.
docstr_tok: ["Add","an","`","img_tensor","`","associated","with","`","img_name","`",",","to","be","shown","on","tensorboard",".","Args",":","img_name","(","str",")",":","The","name","of","the","image","to","put","into","tensorboard",".","img_tensor","(","torch.Tensor","or","numpy.array",")",":","An","`","uint8","`","or","`","float","`","Tensor","of","shape","`","[","channel",",","height",",","width","]","`","where","`","channel","`","is","3",".","The","image","format","should","be","RGB",".","The","elements","in","img_tensor","can","either","have","values","in","[","0",",","1","]","(","float32",")","or","[","0",",","255","]","(","uint8",")",".","The","`","img_tensor","`","will","be","visualized","in","tensorboard","."]
code: def put_image(self, img_name, img_tensor):
      """
      Add an `img_tensor` associated with `img_name`, to be shown on
      tensorboard.
  
      Args:
          img_name (str): The name of the image to put into tensorboard.
          img_tensor (torch.Tensor or numpy.array): An `uint8` or `float`
              Tensor of shape `[channel, height, width]` where `channel` is
              3. The image format should be RGB. The elements in img_tensor
              can either have values in [0, 1] (float32) or [0, 255] (uint8).
              The `img_tensor` will be visualized in tensorboard.
      """
      self._vis_data.append((img_name, img_tensor, self._iter))
  
imports: import datetime
  import json
  import logging
  import os
  import time
  from collections import defaultdict
  from contextlib import contextmanager
  from functools import cached_property
  from typing import Optional
  import torch
  from fvcore.common.history_buffer import HistoryBuffer
  from detectron2.utils.file_io import PathManager
label_desc: Use image node_id 2 for calling the EventStorage obj's underlying member method code with example usage: obj.put_image(img_name, img_tensor) without return types