code: def tb_model_weights(self, model, step):
      layer_num = 1
      for name, param in model.named_parameters():
          if param.numel() == 1:
              self.writer.add_scalar(
                  "layer{}-{}/value".format(layer_num, name),
                  param.max(),
                  step,
              )
          else:
              self.writer.add_scalar(
                  "layer{}-{}/max".format(layer_num, name),
                  param.max(),
                  step,
              )
              self.writer.add_scalar(
                  "layer{}-{}/min".format(layer_num, name),
                  param.min(),
                  step,
              )
              self.writer.add_scalar(
                  "layer{}-{}/mean".format(layer_num, name),
                  param.mean(),
                  step,
              )
              self.writer.add_scalar(
                  "layer{}-{}/std".format(layer_num, name),
                  param.std(),
                  step,
              )
              self.writer.add_histogram(
                  "layer{}-{}/param".format(layer_num, name),
                  param,
                  step,
              )
              self.writer.add_histogram(
                  "layer{}-{}/grad".format(layer_num, name),
                  param.grad,
                  step,
              )
          layer_num += 1
  
file_path: TTS/TTS/utils/tensorboard_logger.py
imports: import traceback
  from tensorboardX import SummaryWriter
label_desc: Use image node_id 2 for calling the TensorboardLogger obj's underlying member method code with example usage: obj.tb_model_weights(model, step) without return types