def train(self, states_val, actions_val, rewards_val, next_states_val, terminals_val):
        """
        Train one batch.

        1. Set shared variable in states_shared, next_states_shared, actions_shared, rewards_shared, terminals_shared         
        2. perform batch training

        Parameters
        -----------
        states_val : list of batch_size * [list of max_num_elements* [list of k * [element 2D,1D or scalar]])
        actions_val : b x 1 numpy array of integers
        rewards_val : b x 1 numpy array
        next_states_val : list of batch_size * [list of max_num_elements* [list of k * [element 2D,1D or scalar]])
        terminals_val : b x 1 numpy boolean array (currently ignored)


        Returns
        -------
        average loss of the batch training
        """
        
        for i in range(len(self.states_shared)):
            self.states_shared[i].set_value(states_val[i])
            
        for i in range(len(self.states_shared)):
            self.next_states_shared[i].set_value(next_states_val[i])

        
        self.actions_shared.set_value(actions_val.reshape(len(actions_val), 1))
        self.rewards_shared.set_value(rewards_val.reshape(len(rewards_val), 1))
        self.terminals_shared.set_value(terminals_val.reshape(len(terminals_val), 1))
        if self.freeze_interval % self.update_counter == 0:
            self._resetQHat()
        
        if(self._DoubleQ==True):
            self._next_q_curr_qnet = self.next_q_vals_current_qnet()
            loss, diff, _ = self._train(self._df, self._lr,self._next_q_curr_qnet)
        else:
            loss, diff, _ = self._train(self._df, self._lr)

        self.update_counter += 1
        return np.sqrt(loss)
dataset/ETHPy150Open VinF/deer/deer/q_networks/q_net_theano.py/MyQNetwork.train/swapped operands of `%`