code: def visual_in_traning(log_writer, vis_dict, step):
      """
      Visual in vdl
  
      Args:
          log_writer (LogWriter): The log writer of vdl.
          vis_dict (dict): Dict of tensor. The shape of thesor is (C, H, W)
      """
      for key, value in vis_dict.items():
          value_shape = value.shape
          if value_shape[0] not in [1, 3]:
              value = value[0]
              value = value.unsqueeze(0)
          value = paddle.transpose(value, (1, 2, 0))
          min_v = paddle.min(value)
          max_v = paddle.max(value)
          if (min_v > 0) and (max_v < 1):
              value = value * 255
          elif (min_v < 0 and min_v >= -1) and (max_v <= 1):
              value = (1 + value) / 2 * 255
          else:
              value = (value - min_v) / (max_v - min_v) * 255
  
          value = value.astype("uint8")
          value = value.numpy()
          log_writer.add_image(tag=key, img=value, step=step)
  
file_path: PaddleSeg/Matting/ppmatting/core/train.py
imports: import os
  import time
  from collections import deque, defaultdict
  import pickle
  import shutil
  import numpy
  import paddle
  import paddle.nn.functional
  from paddleseg.utils import TimeAverager, calculate_eta, resume, logger, train_profiler
  from .val import evaluate
label_desc: Use image node_id 1 for calling a global function with example usage: visual_in_traning(log_writer, vis_dict, step) without return types