class_docstr: Shows the model graph in `TensorBoard <https
  ://www.tensorflow.org/tensorboard`>_.
class_docstr_tok: ["Shows","the","model","graph","in","`","TensorBoard","<","https",":","\/\/www.tensorflow.org\/tensorboard","`",">","_","."]
docstr: The constructor method of ModelTensorboardHook.
  
  Args:
      tb_writer: `Tensorboard SummaryWriter <https://tensorboardx.
      readthedocs.io/en/latest/tensorboard.html#tensorboardX.
      SummaryWriter>`_ instance or None (only on secondary replicas)
docstr_tok: ["The","constructor","method","of","ModelTensorboardHook",".","Args",":","tb_writer",":","`","Tensorboard","SummaryWriter","<","https",":","\/\/tensorboardx",".","readthedocs.io\/en\/latest\/tensorboard.html","#","tensorboardX",".","SummaryWriter",">","`","_","instance","or","None","(","only","on","secondary","replicas",")"]
code: def __init__(self, tb_writer) -> None:
      """The constructor method of ModelTensorboardHook.
  
      Args:
          tb_writer: `Tensorboard SummaryWriter <https://tensorboardx.
          readthedocs.io/en/latest/tensorboard.html#tensorboardX.
          SummaryWriter>`_ instance or None (only on secondary replicas)
      """
      super().__init__()
      if not tb_available:
          raise ModuleNotFoundError(
              "tensorboard not installed, cannot use ModelTensorboardHook"
          )
      self.tb_writer = tb_writer
  
file_path: ClassyVision/classy_vision/hooks/model_tensorboard_hook.py
imports: import logging
  from typing import Any, Dict
  from classy_vision.generic.distributed_util import is_primary
  from classy_vision.generic.visualize import plot_model
  from classy_vision.hooks import register_hook
  from classy_vision.hooks.classy_hook import ClassyHook
label_desc: Use image node_id 1 to create a new ModelTensorboardHook object from inherited base classes: ClassyHook with example: obj = ModelTensorboardHook(tb_writer)