(self, itr_load)
Initialize from the specified iteration.
        Args:
            itr_load: If specified, loads algorithm state from that
                iteration, and resumes training at the next iteration.
        Returns:
            itr_start: Iteration to start from.
Initialize from the specified iteration.
        Args:
            itr_load: If specified, loads algorithm state from that
                iteration, and resumes training at the next iteration.
        Returns:
            itr_start: Iteration to start from.
Initialize from the specified iteration . Args : itr_load : If specified loads algorithm state from that iteration and resumes training at the next iteration . Returns : itr_start : Iteration to start from .
def _initialize(self, itr_load):
        """
        Initialize from the specified iteration.
        Args:
            itr_load: If specified, loads algorithm state from that
                iteration, and resumes training at the next iteration.
        Returns:
            itr_start: Iteration to start from.
        """
        if itr_load is None:
            if self.gui:
                self.gui.set_status_text('Press \'go\' to begin.')
            return 0
        else:
            algorithm_file = self._data_files_dir + 'algorithm_itr_%02d.pkl' % itr_load
            self.algorithm = self.data_logger.unpickle(algorithm_file)
            if self.algorithm is None:
                print("Error: cannot find '%s.'" % algorithm_file)
                os._exit(1) # called instead of sys.exit(), since this is in a thread

            if self.gui:
                traj_sample_lists = self.data_logger.unpickle(self._data_files_dir +
                    ('traj_sample_itr_%02d.pkl' % itr_load))
                if self.algorithm.cur[0].pol_info:
                    pol_sample_lists = self.data_logger.unpickle(self._data_files_dir +
                        ('pol_sample_itr_%02d.pkl' % itr_load))
                else:
                    pol_sample_lists = None
                self.gui.set_status_text(
                    ('Resuming training from algorithm state at iteration %d.\n' +
                    'Press \'go\' to begin.') % itr_load)
            return itr_load + 1
def _initialize ( self , itr_load ) : if itr_load is None : if self . gui : self . gui . set_status_text ( 'Press \'go\' to begin.' ) return 0 else : algorithm_file = self . _data_files_dir + 'algorithm_itr_%02d.pkl' % itr_load self . algorithm = self . data_logger . unpickle ( algorithm_file ) if self . algorithm is None : print ( "Error: cannot find '%s.'" % algorithm_file ) os . _exit ( 1 ) # called instead of sys.exit(), since this is in a thread if self . gui : traj_sample_lists = self . data_logger . unpickle ( self . _data_files_dir + ( 'traj_sample_itr_%02d.pkl' % itr_load ) ) if self . algorithm . cur [ 0 ] . pol_info : pol_sample_lists = self . data_logger . unpickle ( self . _data_files_dir + ( 'pol_sample_itr_%02d.pkl' % itr_load ) ) else : pol_sample_lists = None self . gui . set_status_text ( ( 'Resuming training from algorithm state at iteration %d.\n' + 'Press \'go\' to begin.' ) % itr_load ) return itr_load + 1