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.
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, _ = pack_and_forward(
              self.model, batch_state, exp_batch["recurrent_state"]
          )
      else:
          qout = self.model(batch_state)
      n_atoms = qout.z_values.size()[0]
  
      batch_actions = exp_batch["action"]
      batch_q = qout.evaluate_actions_as_distribution(batch_actions)
      assert batch_q.shape == (batch_size, n_atoms)
  
      with torch.no_grad():
          batch_q_target = self._compute_target_values(exp_batch)
          assert batch_q_target.shape == (batch_size, n_atoms)
  
          # for `agent.get_statistics()`
          batch_q_scalars = qout.evaluate_actions(batch_actions)
          self.q_record.extend(
              batch_q_scalars.detach().cpu().numpy().ravel()
          )
  
      return batch_q, batch_q_target
  
file_path: pfrl/pfrl/agents/categorical_dqn.py
imports: import torch
  from pfrl.agents import dqn
  from pfrl.utils.recurrent import pack_and_forward
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