class_docstr: Dynamic Policy Programming.
  
  See: https://arxiv.org/abs/1004.2027.
class_docstr_tok: ["Dynamic","Policy","Programming",".","See",":","https",":","\/\/arxiv.org\/abs\/1004.2027","."]
code: def _compute_y_and_t(self, exp_batch):
      batch_state = exp_batch["state"]
      batch_size = len(exp_batch["reward"])
  
      if self.recurrent:
          qout, _ = self.model.n_step_forward(
              batch_state,
              exp_batch["recurrent_state"],
              output_mode="concat",
          )
      else:
          qout = self.model(batch_state)
  
      batch_actions = exp_batch["action"]
      # Q(s_t,a_t)
      batch_q = F.reshape(
          qout.evaluate_actions(batch_actions), (batch_size, 1)
      )
  
      with chainer.no_backprop_mode():
          # Compute target values
          if self.recurrent:
              target_qout, _ = self.target_model.n_step_forward(
                  batch_state,
                  exp_batch["recurrent_state"],
                  output_mode="concat",
              )
          else:
              target_qout = self.target_model(batch_state)
  
          # Q'(s_t,a_t)
          target_q = F.reshape(
              target_qout.evaluate_actions(batch_actions),
              (batch_size, 1),
          )
  
          # LQ'(s_t,a)
          target_q_expect = F.reshape(
              self._l_operator(target_qout), (batch_size, 1)
          )
  
          # r + g * LQ'(s_{t+1},a)
          batch_q_target = F.reshape(
              self._compute_target_values(exp_batch), (batch_size, 1)
          )
  
          # Q'(s_t,a_t) + r + g * LQ'(s_{t+1},a) - LQ'(s_t,a)
          t = target_q + batch_q_target - target_q_expect
  
      return batch_q, t
  
imports: from abc import ABCMeta
  from abc import abstractmethod
  import chainer
  import chainer.functions
  from chainerrl.agents.dqn import DQN
label_desc: Use image node_id 3 for calling the AbstractDPP obj's underlying member method code with example usage: obj._compute_y_and_t(exp_batch) and returns: batch_q,  t