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: Plot the model on Tensorboard.
docstr_tok: ["Plot","the","model","on","Tensorboard","."]
code: def on_start(self, task) -> None:
      """
      Plot the model on Tensorboard.
      """
      if is_primary():
          try:
              # Show model in tensorboard:
              logging.info("Showing model graph in TensorBoard...")
  
              plot_model(
                  task.base_model,
                  size=task.base_model.input_shape,
                  input_key=task.base_model.input_key
                  if hasattr(task.base_model, "input_key")
                  else None,
                  writer=self.tb_writer,
              )
          except Exception:
              logging.warning("Unable to plot model to tensorboard")
              logging.debug("Exception encountered:", exc_info=True)
  
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 3 for calling the ModelTensorboardHook obj's underlying member method code with example usage: obj.on_start(task) without return types