class_docstr: This abstract base class defines the API for summary writers.
class_docstr_tok: ["This","abstract","base","class","defines","the","API","for","summary","writers","."]
docstr: Initialise the summary writer.
  
  :param summary_writer: Activate summary writer for TensorBoard.
                 Default is `False` and deactivated summary writer.
                 If `True` save runs/CURRENT_DATETIME_HOSTNAME in current directory.
                 If of type `str` save in path.
                 Use hierarchical folder structure to compare between runs easily. e.g. pass in
                 ‘runs/exp1’, ‘runs/exp2’, etc. for each new experiment to compare across them.
docstr_tok: ["Initialise","the","summary","writer",".",":","param","summary_writer",":","Activate","summary","writer","for","TensorBoard",".","Default","is","`","False","`","and","deactivated","summary","writer",".","If","`","True","`","save","runs\/CURRENT_DATETIME_HOSTNAME","in","current","directory",".","If","of","type","`","str","`","save","in","path",".","Use","hierarchical","folder","structure","to","compare","between","runs","easily",".","e.g",".","pass","in","\u2018","runs\/exp1","\u2019",",","\u2018","runs\/exp2","\u2019",",","etc",".","for","each","new","experiment","to","compare","across","them","."]
code: def _init_summary_writer(self, summary_writer, init_counter):
      """
      Initialise the summary writer.
  
      :param summary_writer: Activate summary writer for TensorBoard.
                     Default is `False` and deactivated summary writer.
                     If `True` save runs/CURRENT_DATETIME_HOSTNAME in current directory.
                     If of type `str` save in path.
                     Use hierarchical folder structure to compare between runs easily. e.g. pass in
                     ‘runs/exp1’, ‘runs/exp2’, etc. for each new experiment to compare across them.
      """
      from tensorboardX import SummaryWriter as SummaryWriterTbx
  
      if isinstance(summary_writer, str):
          comment = f"generate-{init_counter}"
          logdir = summary_writer + "/" + comment
          self._summary_writer = SummaryWriterTbx(logdir=logdir)
      else:
          comment = f"-generate-{init_counter}"
          self._summary_writer = SummaryWriterTbx(comment=comment)
  
file_path: adversarial-robustness-toolbox/art/summary_writer.py
imports: from abc import ABC, abstractmethod
  from math import sqrt
  from typing import Dict, List, Optional, Union
  import numpy
label_desc: Use image node_id 4 for calling the SummaryWriter obj's underlying member method code with example usage: obj._init_summary_writer(summary_writer, init_counter) without return types