agent.py
def save_progress(self, stack):
        """
        Save the current progress of the agent,
        that is the readout values, the hidden layer values,
        the images in the current stack of the agent
        and the current neural network
        """
        log.info('saving current stack')
        for i in range(stack.shape[2]):
            current_percept_path = self.percepts_directory + '/frame' + \
                                   str(self.step) + '-' + str(i) +'.png'
            self.perception.save_percepts(current_percept_path, stack[:,:,i])

        if not self.train:
            log.debug('no need to save network - we are not training')
            return

        log.info('saving percepts')
        with open(self.logs_directory + '/readout.txt', 'w+') as a_file:
            with open(self.logs_directory + '/hidden.txt', 'w+') as h_file:
                self.perception.save_variables(a_file, h_file, stack)

        log.info('saving current network')
        self.perception.save_network(self.networks_directory, self.step)

        Save the current progress of the agent,
        that is the readout values, the hidden layer values,
        the images in the current stack of the agent
        and the current neural network
        
Save the current progress of the agent,
that is the readout values, the hidden layer values,
the images in the current stack of the agent
and the current neural network
Save the current progress of the agent that is the readout values the hidden layer values the images in the current stack of the agent and the current neural network
def save_progress(self, stack):
        log.info('saving current stack')
        for i in range(stack.shape[2]):
            current_percept_path = self.percepts_directory + '/frame' + \
                                   str(self.step) + '-' + str(i) +'.png'
            self.perception.save_percepts(current_percept_path, stack[:,:,i])
        if not self.train:
            log.debug('no need to save network - we are not training')
            return
        log.info('saving percepts')
        with open(self.logs_directory + '/readout.txt', 'w+') as a_file:
            with open(self.logs_directory + '/hidden.txt', 'w+') as h_file:
                self.perception.save_variables(a_file, h_file, stack)
        log.info('saving current network')
        self.perception.save_network(self.networks_directory, self.step)
def save_progress ( self , stack ) : log . info ( 'saving current stack' ) for i in range ( stack . shape [ 2 ] ) : current_percept_path = self . percepts_directory + '/frame' + str ( self . step ) + '-' + str ( i ) + '.png' self . perception . save_percepts ( current_percept_path , stack [ : , : , i ] ) if not self . train : log . debug ( 'no need to save network - we are not training' ) return log . info ( 'saving percepts' ) with open ( self . logs_directory + '/readout.txt' , 'w+' ) as a_file : with open ( self . logs_directory + '/hidden.txt' , 'w+' ) as h_file : self . perception . save_variables ( a_file , h_file , stack ) log . info ( 'saving current network' ) self . perception . save_network ( self . networks_directory , self . step )
Save the current progress of the agent,
that is the readout values, the hidden layer values,
the images in the current stack of the agent
and the current neural network
Save the current progress of the agent that is the readout values the hidden layer values the images in the current stack of the agent and the current neural network
"""
        Save the current progress of the agent,
        that is the readout values, the hidden layer values,
        the images in the current stack of the agent
        and the current neural network
        """
self
stack