docstr: input:
      batch: dict(o, s, u, r, u_onehot, avail_u, padded, isover, actor_inputs, critic_inputs)
  output:
      q_evals and q_targets: shape (ep_num, tr_num, n_agents, n_actions)
docstr_tok: ["input",":","batch",":","dict","(","o",",","s",",","u",",","r",",","u_onehot",",","avail_u",",","padded",",","isover",",","actor_inputs",",","critic_inputs",")","output",":","q_evals","and","q_targets",":","shape","(","ep_num",",","tr_num",",","n_agents",",","n_actions",")"]
code: def _get_critic_output(self, batch):
      """input:
          batch: dict(o, s, u, r, u_onehot, avail_u, padded, isover, actor_inputs, critic_inputs)
      output:
          q_evals and q_targets: shape (ep_num, tr_num, n_agents, n_actions)
      """
      ep_num = batch["r"].shape[0]
      tr_num = batch["r"].shape[1]
      critic_inputs = batch["critic_inputs"]
      critic_inputs_next = batch["critic_inputs_next"]
  
      critic_inputs = critic_inputs.reshape(
          (ep_num * tr_num * self.n_agents, -1)
      )
      critic_inputs_next = critic_inputs.reshape(
          (ep_num * tr_num * self.n_agents, -1)
      )
  
      q_evals = self.model.value(critic_inputs)
      q_targets = self.model.value(critic_inputs_next)
  
      q_evals = q_evals.reshape((ep_num, tr_num, self.n_agents, -1))
      q_targets = q_targets.reshape((ep_num, tr_num, self.n_agents, -1))
      return q_evals, q_targets
  
file_path: PARL/parl/algorithms/torch/coma.py
imports: import torch
  import os
  from copy import deepcopy
  import parl
  from parl.utils.utils import check_model_method
  import numpy
label_desc: Use image node_id 4 for calling the COMA obj's underlying member method code with example usage: obj._get_critic_output(batch) and returns: q_evals,  q_targets