autorl/agents.py
def q_eval(self, state, freeze_flag=False, reshape=None):
        """
        Evaluate the q network (or frozen q network) at the current state array
        :param state: State array (or array of state arrays)
        :param freeze_flag: Boolean for whether we should use a frozen network for eval
        :param reshape: A shape to reshape the output to (if needed)
        :return: Action value predictions
        """
        if freeze_flag:
            assert self._frozen_q_network is not None, \
                "Asked for the frozen q network evaluation, but no frozen q network available."
            preds = self._frozen_q_network.predict(state)

        else:
            preds = self._q_network.predict(state)

        if reshape is not None:
            preds = preds.reshape(reshape)

        return preds

        Evaluate the q network (or frozen q network) at the current state array
        :param state: State array (or array of state arrays)
        :param freeze_flag: Boolean for whether we should use a frozen network for eval
        :param reshape: A shape to reshape the output to (if needed)
        :return: Action value predictions
        
Evaluate the q network (or frozen q network) at the current state array
Evaluate the q network ( or frozen q network ) at the current state array
def q_eval(self, state, freeze_flag=False, reshape=None):
        if freeze_flag:
            assert self._frozen_q_network is not None, \
                "Asked for the frozen q network evaluation, but no frozen q network available."
            preds = self._frozen_q_network.predict(state)
        else:
            preds = self._q_network.predict(state)
        if reshape is not None:
            preds = preds.reshape(reshape)
        return preds
def q_eval ( self , state , freeze_flag = False , reshape = None ) : if freeze_flag : assert self . _frozen_q_network is not None , "Asked for the frozen q network evaluation, but no frozen q network available." preds = self . _frozen_q_network . predict ( state ) else : preds = self . _q_network . predict ( state ) if reshape is not None : preds = preds . reshape ( reshape ) return preds
Evaluate the q network (or frozen q network) at the current state array
Evaluate the q network ( or frozen q network ) at the current state array
"""
        Evaluate the q network (or frozen q network) at the current state array
        :param state: State array (or array of state arrays)
        :param freeze_flag: Boolean for whether we should use a frozen network for eval
        :param reshape: A shape to reshape the output to (if needed)
        :return: Action value predictions
        """
Action value predictions
Action value predictions
self
state
State array (or array of state arrays)
State array ( or array of state arrays )
freeze_flag
Boolean for whether we should use a frozen network for eval
Boolean for whether we should use a frozen network for eval
reshape
A shape to reshape the output to (if needed)
A shape to reshape the output to ( if needed )