class_docstr: Writes entries directly to event files in the log_dir to be consumed by TensorBoard.
  
  The `SummaryWriter` class provides a high-level API to create an event file
  in a given directory and add summaries and events to it. The class updates the
  file contents asynchronously. This allows a training program to call methods
  to add data to the file directly from the training loop, without slowing down
  training.
class_docstr_tok: ["Writes","entries","directly","to","event","files","in","the","log_dir","to","be","consumed","by","TensorBoard",".","The","`","SummaryWriter","`","class","provides","a","high-level","API","to","create","an","event","file","in","a","given","directory","and","add","summaries","and","events","to","it",".","The","class","updates","the","file","contents","asynchronously",".","This","allows","a","training","program","to","call","methods","to","add","data","to","the","file","directly","from","the","training","loop",",","without","slowing","down","training","."]
docstr: Add meshes or 3D point clouds to TensorBoard.
  
  The visualization is based on Three.js,
  so it allows users to interact with the rendered object. Besides the basic definitions
  such as vertices, faces, users can further provide camera parameter, lighting condition, etc.
  Please check https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene for
  advanced usage.
  
  Args:
      tag (str): Data identifier
      vertices (torch.Tensor): List of the 3D coordinates of vertices.
      colors (torch.Tensor): Colors for each vertex
      faces (torch.Tensor): Indices of vertices within each triangle. (Optional)
      config_dict: Dictionary with ThreeJS classes names and configuration.
      global_step (int): Global step value to record
      walltime (float): Optional override default walltime (time.time())
        seconds after epoch of event
  
  Shape:
      vertices: :math:`(B, N, 3)`. (batch, number_of_vertices, channels)
  
      colors: :math:`(B, N, 3)`. The values should lie in [0, 255] for type `uint8` or [0, 1] for type `float`.
  
      faces: :math:`(B, N, 3)`. The values should lie in [0, number_of_vertices] for type `uint8`.
  
  Examples::
  
      from torch.utils.tensorboard import SummaryWriter
      vertices_tensor = torch.as_tensor([
          [1, 1, 1],
          [-1, -1, 1],
          [1, -1, -1],
          [-1, 1, -1],
      ], dtype=torch.float).unsqueeze(0)
      colors_tensor = torch.as_tensor([
          [255, 0, 0],
          [0, 255, 0],
          [0, 0, 255],
          [255, 0, 255],
      ], dtype=torch.int).unsqueeze(0)
      faces_tensor = torch.as_tensor([
          [0, 2, 3],
          [0, 3, 1],
          [0, 1, 2],
          [1, 3, 2],
      ], dtype=torch.int).unsqueeze(0)
  
      writer = SummaryWriter()
      writer.add_mesh('my_mesh', vertices=vertices_tensor, colors=colors_tensor, faces=faces_tensor)
  
      writer.close()
docstr_tok: ["Add","meshes","or","3D","point","clouds","to","TensorBoard",".","The","visualization","is","based","on","Three.js",",","so","it","allows","users","to","interact","with","the","rendered","object",".","Besides","the","basic","definitions","such","as","vertices",",","faces",",","users","can","further","provide","camera","parameter",",","lighting","condition",",","etc",".","Please","check","https",":","\/\/threejs.org\/docs\/index.html","#","manual\/en\/introduction\/Creating-a-scene","for","advanced","usage",".","Args",":","tag","(","str",")",":","Data","identifier","vertices","(","torch.Tensor",")",":","List","of","the","3D","coordinates","of","vertices",".","colors","(","torch.Tensor",")",":","Colors","for","each","vertex","faces","(","torch.Tensor",")",":","Indices","of","vertices","within","each","triangle",".","(","Optional",")","config_dict",":","Dictionary","with","ThreeJS","classes","names","and","configuration",".","global_step","(","int",")",":","Global","step","value","to","record","walltime","(","float",")",":","Optional","override","default","walltime","(","time.time","(",")",")","seconds","after","epoch","of","event","Shape",":","vertices",":",":","math",":","`","(","B",",","N",",","3",")","`",".","(","batch",",","number_of_vertices",",","channels",")","colors",":",":","math",":","`","(","B",",","N",",","3",")","`",".","The","values","should","lie","in","[","0",",","255","]","for","type","`","uint8","`","or","[","0",",","1","]","for","type","`","float","`",".","faces",":",":","math",":","`","(","B",",","N",",","3",")","`",".","The","values","should","lie","in","[","0",",","number_of_vertices","]","for","type","`","uint8","`",".","Examples",":",":","from","torch.utils.tensorboard","import","SummaryWriter","vertices_tensor","=","torch.as_tensor","(","[","[","1",",","1",",","1","]",",","[","-1",",","-1",",","1","]",",","[","1",",","-1",",","-1","]",",","[","-1",",","1",",","-1","]",",","]",",","dtype=torch.float",")",".unsqueeze","(","0",")","colors_tensor","=","torch.as_tensor","(","[","[","255",",","0",",","0","]",",","[","0",",","255",",","0","]",",","[","0",",","0",",","255","]",",","[","255",",","0",",","255","]",",","]",",","dtype=torch.int",")",".unsqueeze","(","0",")","faces_tensor","=","torch.as_tensor","(","[","[","0",",","2",",","3","]",",","[","0",",","3",",","1","]",",","[","0",",","1",",","2","]",",","[","1",",","3",",","2","]",",","]",",","dtype=torch.int",")",".unsqueeze","(","0",")","writer","=","SummaryWriter","(",")","writer.add_mesh","(","'my_mesh","'",",","vertices=vertices_tensor",",","colors=colors_tensor",",","faces=faces_tensor",")","writer.close","(",")"]
code: def add_mesh(
      self,
      tag,
      vertices,
      colors=None,
      faces=None,
      config_dict=None,
      global_step=None,
      walltime=None,
  ):
      """Add meshes or 3D point clouds to TensorBoard.
  
      The visualization is based on Three.js,
      so it allows users to interact with the rendered object. Besides the basic definitions
      such as vertices, faces, users can further provide camera parameter, lighting condition, etc.
      Please check https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene for
      advanced usage.
  
      Args:
          tag (str): Data identifier
          vertices (torch.Tensor): List of the 3D coordinates of vertices.
          colors (torch.Tensor): Colors for each vertex
          faces (torch.Tensor): Indices of vertices within each triangle. (Optional)
          config_dict: Dictionary with ThreeJS classes names and configuration.
          global_step (int): Global step value to record
          walltime (float): Optional override default walltime (time.time())
            seconds after epoch of event
  
      Shape:
          vertices: :math:`(B, N, 3)`. (batch, number_of_vertices, channels)
  
          colors: :math:`(B, N, 3)`. The values should lie in [0, 255] for type `uint8` or [0, 1] for type `float`.
  
          faces: :math:`(B, N, 3)`. The values should lie in [0, number_of_vertices] for type `uint8`.
  
      Examples::
  
          from torch.utils.tensorboard import SummaryWriter
          vertices_tensor = torch.as_tensor([
              [1, 1, 1],
              [-1, -1, 1],
              [1, -1, -1],
              [-1, 1, -1],
          ], dtype=torch.float).unsqueeze(0)
          colors_tensor = torch.as_tensor([
              [255, 0, 0],
              [0, 255, 0],
              [0, 0, 255],
              [255, 0, 255],
          ], dtype=torch.int).unsqueeze(0)
          faces_tensor = torch.as_tensor([
              [0, 2, 3],
              [0, 3, 1],
              [0, 1, 2],
              [1, 3, 2],
          ], dtype=torch.int).unsqueeze(0)
  
          writer = SummaryWriter()
          writer.add_mesh('my_mesh', vertices=vertices_tensor, colors=colors_tensor, faces=faces_tensor)
  
          writer.close()
      """
      torch._C._log_api_usage_once("tensorboard.logging.add_mesh")
      self._get_file_writer().add_summary(
          mesh(tag, vertices, colors, faces, config_dict),
          global_step,
          walltime,
      )
  
imports: import os
  import time
  from typing import List, Optional, Union, TYPE_CHECKING
  import torch
  from tensorboard.compat import tf
  from tensorboard.compat.proto import event_pb2
  from tensorboard.compat.proto.event_pb2 import Event, SessionLog
  from tensorboard.plugins.projector.projector_config_pb2 import ProjectorConfig
  from tensorboard.summary.writer.event_file_writer import EventFileWriter
  from ._convert_np import make_np
  from ._embedding import get_embedding_info, make_mat, make_sprite, make_tsv, write_pbtxt
  from ._onnx_graph import load_onnx_graph
  from ._pytorch_graph import graph
  from ._utils import figure_to_image
  from .summary import audio, custom_scalars, histogram, histogram_raw, hparams, image, image_boxes, mesh, pr_curve, pr_curve_raw, scalar, tensor_proto, text, video
label_desc: Use image node_id 27 for calling the SummaryWriter obj's underlying member method code with example usage: obj.add_mesh(tag, vertices, colors, faces, config_dict, global_step, walltime) without return types