docstr: input:
      obs: obs + last_action + agent_id, shape: (1, obs_shape + n_actions + n_agents)
      rnn_h_in: rnn's hidden input
  output:
      prob: output of actor, shape: (1, n_actions)
      rnn_h_out: rnn's hidden output
docstr_tok: ["input",":","obs",":","obs","+","last_action","+","agent_id",",","shape",":","(","1",",","obs_shape","+","n_actions","+","n_agents",")","rnn_h_in",":","rnn","'s","hidden","input","output",":","prob",":","output","of","actor",",","shape",":","(","1",",","n_actions",")","rnn_h_out",":","rnn","'s","hidden","output"]
code: def predict(self, obs, rnn_h_in):
      """input:
          obs: obs + last_action + agent_id, shape: (1, obs_shape + n_actions + n_agents)
          rnn_h_in: rnn's hidden input
      output:
          prob: output of actor, shape: (1, n_actions)
          rnn_h_out: rnn's hidden output
      """
      obs = np.expand_dims(obs, 0)
      obs = torch.tensor(obs, dtype=torch.float32).to(device)
      prob, rnn_h_out = self.alg.predict(obs, rnn_h_in)
      return prob, rnn_h_out
  
file_path: PARL/benchmark/torch/coma/sc2_agent.py
imports: import numpy
  import parl
  import torch
  from torch.distributions import Categorical
label_desc: Use image node_id 3 for calling the Agents obj's underlying member method code with example usage: obj.predict(obs, rnn_h_in) and returns: prob,  rnn_h_out