original_docstring:  Initialize a Session.
  
          Load's the model's state file, and sets the paths to any underlying Tensorboard logs, ready
          for access on request.
  
          Parameters
          ----------
          model_folder: str, optional
              If loading a session manually (e.g. for the analysis tab), then the path to the model
              folder must be provided. For training sessions, this should be left at ``None``
          model_name: str, optional
              If loading a session manually (e.g. for the analysis tab), then the model filename
              must be provided. For training sessions, this should be left at ``None``
          is_training: bool, optional
              ``True`` if the session is being initialized for a training session, otherwise
              ``False``. Default: ``False``
           
docstring: Initialize a Session.
  Load's the model's state file, and sets the paths to any underlying Tensorboard logs, ready
  for access on request.
  
  Parameters
  
  str, optional
  If loading a session manually , then the path to the model
  folder must be provided. For training sessions, this should be left at ``None``
  model_name: str, optional
  If loading a session manually , then the model filename
  must be provided.
docstring_tokens: Initialize a Session . Load ' s the model ' s state file and sets the paths to any underlying Tensorboard logs ready for access on request . Parameters str optional If loading a session manually then the path to the model folder must be provided . For training sessions this should be left at ` ` None ` ` model_name : str optional If loading a session manually then the model filename must be provided .
code: def initialize_session(self, model_folder, model_name, is_training=False):
          """ Initialize a Session.
  
          Load's the model's state file, and sets the paths to any underlying Tensorboard logs, ready
          for access on request.
  
          Parameters
          ----------
          model_folder: str, optional
              If loading a session manually (e.g. for the analysis tab), then the path to the model
              folder must be provided. For training sessions, this should be left at ``None``
          model_name: str, optional
              If loading a session manually (e.g. for the analysis tab), then the model filename
              must be provided. For training sessions, this should be left at ``None``
          is_training: bool, optional
              ``True`` if the session is being initialized for a training session, otherwise
              ``False``. Default: ``False``
           """
          logger.debug("Initializing session: (is_training: %s)", is_training)
  
          if self._model_dir == model_folder and self._model_name == model_name:
              if is_training:
                  self._tb_logs.refresh_log_filenames()
                  self._load_state_file()
                  self._is_training = True
              logger.debug("Requested session is already loaded. Not initializing: (model_folder: "
                           "%s, model_name: %s)", model_folder, model_name)
              return
  
          self._is_training = is_training
          self._model_dir = model_folder
          self._model_name = model_name
          self._load_state_file()
          self._tb_logs = TensorBoardLogs(os.path.join(self._model_dir,
                                                       "{}_logs".format(self._model_name)))
  
          self._summary = SessionsSummary(self)
          logger.debug("Initialized session. Session_IDS: %s", self.session_ids)
code_tokens: def initialize_session ( self , model_folder , model_name , is_training = False ) : logger . debug ( "Initializing session: (is_training: %s)" , is_training ) if self . _model_dir == model_folder and self . _model_name == model_name : if is_training : self . _tb_logs . refresh_log_filenames ( ) self . _load_state_file ( ) self . _is_training = True logger . debug ( "Requested session is already loaded. Not initializing: (model_folder: " "%s, model_name: %s)" , model_folder , model_name ) return self . _is_training = is_training self . _model_dir = model_folder self . _model_name = model_name self . _load_state_file ( ) self . _tb_logs = TensorBoardLogs ( os . path . join ( self . _model_dir , "{}_logs" . format ( self . _model_name ) ) ) self . _summary = SessionsSummary ( self ) logger . debug ( "Initialized session. Session_IDS: %s" , self . session_ids )
short_docstring: Initialize a Session.
short_docstring_tokens: Initialize a Session .
comment: """ Initialize a Session.
  
          Load's the model's state file, and sets the paths to any underlying Tensorboard logs, ready
          for access on request.
  
          Parameters
          ----------
          model_folder: str, optional
              If loading a session manually (e.g. for the analysis tab), then the path to the model
              folder must be provided. For training sessions, this should be left at ``None``
          model_name: str, optional
              If loading a session manually (e.g. for the analysis tab), then the model filename
              must be provided. For training sessions, this should be left at ``None``
          is_training: bool, optional
              ``True`` if the session is being initialized for a training session, otherwise
              ``False``. Default: ``False``
           """