class_docstr: TensorBoardChannel defines how to format and report the result of a PyText
  job to TensorBoard.
  
  Attributes:
      summary_writer: An instance of the TensorBoard SummaryWriter class, or
          an object that implements the same interface.
          https://pytorch.org/docs/stable/tensorboard.html
      metric_name: The name of the default metric to display on the
          TensorBoard dashboard, defaults to "accuracy"
      train_step: The training step count
class_docstr_tok: ["TensorBoardChannel","defines","how","to","format","and","report","the","result","of","a","PyText","job","to","TensorBoard",".","Attributes",":","summary_writer",":","An","instance","of","the","TensorBoard","SummaryWriter","class",",","or","an","object","that","implements","the","same","interface",".","https",":","\/\/pytorch.org\/docs\/stable\/tensorboard.html","metric_name",":","The","name","of","the","default","metric","to","display","on","the","TensorBoard","dashboard",",","defaults","to","``","accuracy","''","train_step",":","The","training","step","count"]
docstr: Draws the neural network representation graph in TensorBoard.
  
  Args:
      model (Any): the model object.
      input_to_model (Any): the input to the model (required for PyTorch
          models, since its execution graph is defined by run).
docstr_tok: ["Draws","the","neural","network","representation","graph","in","TensorBoard",".","Args",":","model","(","Any",")",":","the","model","object",".","input_to_model","(","Any",")",":","the","input","to","the","model","(","required","for","PyTorch","models",",","since","its","execution","graph","is","defined","by","run",")","."]
code: def export(self, model, input_to_model=None, **kwargs):
      """
      Draws the neural network representation graph in TensorBoard.
  
      Args:
          model (Any): the model object.
          input_to_model (Any): the input to the model (required for PyTorch
              models, since its execution graph is defined by run).
      """
      try:
          self.summary_writer.add_graph(model, input_to_model, **kwargs)
      except Exception:
          print(
              "WARNING: Unable to export neural network graph to TensorBoard.",
              file=sys.stderr,
          )
          traceback.print_exc(file=sys.stderr)
  
      try:
          if profile_graph is not None:
              profile_graph(self.summary_writer, model, input_to_model)
      except Exception:
          print(
              "WARNING: Unable to export performance graph to Tensor Board.",
              file=sys.stderr,
          )
          traceback.print_exc(file=sys.stderr)
  
      try:
          model.embedding.visualize(self.summary_writer)
      except Exception:
          print(
              "WARNING: Unable to visualize embedding space in TensorBoard.",
              file=sys.stderr,
          )
          traceback.print_exc(file=sys.stderr)
  
imports: import csv
  import sys
  import traceback
  from typing import Tuple
  import numpy
  import torch
  from numpy import linalg
  from pytext.common.constants import Stage
  from pytext.utils.file_io import PathManager
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 8 for calling the TensorBoardChannel obj's underlying member method code with example usage: obj.export(model, input_to_model) without return types