class_docstr: Categorical DQN.
  
  See https://arxiv.org/abs/1707.06887.
  
  Arguments are the same as those of DQN except q_function must return
  DistributionalDiscreteActionValue and clip_delta is ignored.
class_docstr_tok: ["Categorical","DQN",".","See","https",":","\/\/arxiv.org\/abs\/1707.06887",".","Arguments","are","the","same","as","those","of","DQN","except","q_function","must","return","DistributionalDiscreteActionValue","and","clip_delta","is","ignored","."]
docstr: Compute a batch of predicted/target return distributions.
docstr_tok: ["Compute","a","batch","of","predicted\/target","return","distributions","."]
code: def _compute_y_and_t(self, exp_batch):
      """Compute a batch of predicted/target return distributions."""
  
      batch_size = exp_batch["reward"].shape[0]
  
      # Compute Q-values for current states
      batch_state = exp_batch["state"]
  
      # (batch_size, n_actions, n_atoms)
      if self.recurrent:
          qout, _ = self.model.n_step_forward(
              batch_state,
              exp_batch["recurrent_state"],
              output_mode="concat",
          )
      else:
          qout = self.model(batch_state)
      n_atoms = qout.z_values.size
  
      batch_actions = exp_batch["action"]
      batch_q = qout.evaluate_actions_as_distribution(batch_actions)
      assert batch_q.shape == (batch_size, n_atoms)
  
      with chainer.no_backprop_mode():
          batch_q_target = self._compute_target_values(exp_batch)
          assert batch_q_target.shape == (batch_size, n_atoms)
  
      return batch_q, batch_q_target
  
file_path: chainerrl/chainerrl/agents/categorical_dqn.py
imports: import chainer
  from chainer import cuda
  import chainer.functions
  import numpy
  from chainerrl.agents import dqn
label_desc: Use image node_id 2 for calling the CategoricalDQN obj's underlying member method code with example usage: obj._compute_y_and_t(exp_batch) and returns: batch_q,  batch_q_target