class_docstr: Base class for a trainer.
      
docstr: Implemented by three lines:
  
  .. code-block:: python
  
      self.setup_callbacks(callbacks, monitors)
      self.initialize(session_creator, session_init)
      self.main_loop(steps_per_epoch, starting_epoch, max_epoch)
  
  You can call those methods by yourself to have better control on details if needed.
docstr_tok: ["Implemented","by","three","lines",":","..","code-block",":",":","python","self.setup_callbacks","(","callbacks",",","monitors",")","self.initialize","(","session_creator",",","session_init",")","self.main_loop","(","steps_per_epoch",",","starting_epoch",",","max_epoch",")","You","can","call","those","methods","by","yourself","to","have","better","control","on","details","if","needed","."]
code: def train(
      self,
      callbacks,
      monitors,
      session_creator,
      session_init,
      steps_per_epoch,
      starting_epoch=1,
      max_epoch=9999999,
  ):
      """
      Implemented by three lines:
  
      .. code-block:: python
  
          self.setup_callbacks(callbacks, monitors)
          self.initialize(session_creator, session_init)
          self.main_loop(steps_per_epoch, starting_epoch, max_epoch)
  
      You can call those methods by yourself to have better control on details if needed.
      """
      self.setup_callbacks(callbacks, monitors)
      self.initialize(session_creator, session_init)
      self.main_loop(steps_per_epoch, starting_epoch, max_epoch)
  
imports: import copy
  import time
  import weakref
  import tensorflow
  from ..compat import tfv1
  from ..callbacks import Callback, Callbacks, Monitors, MonitorBase
  from ..callbacks.steps import MaintainStepCounter
  from ..tfutils import get_global_step_value
  from ..tfutils.model_utils import describe_trainable_vars
  from ..tfutils.sesscreate import NewSessionCreator, ReuseSessionCreator
  from ..tfutils.sessinit import JustCurrentSession, SessionInit
  from ..utils import logger
  from ..utils.argtools import call_only_once
  from ..utils.utils import humanize_time_delta
  from .config import DEFAULT_CALLBACKS, DEFAULT_MONITORS, TrainConfig
label_desc: Use image node_id 8 for calling the Trainer obj's underlying member method code with example usage: obj.train(callbacks, monitors, session_creator, session_init, steps_per_epoch, starting_epoch, max_epoch) without return types