docstr: function: init a hidden tensor for every agent
  input: 
      ep_num: How many episodes are included in a batch of data
  output:
      rnn_h: rnn hidden state, shape (ep_num, n_agents, hidden_size)
docstr_tok: ["function",":","init","a","hidden","tensor","for","every","agent","input",":","ep_num",":","How","many","episodes","are","included","in","a","batch","of","data","output",":","rnn_h",":","rnn","hidden","state",",","shape","(","ep_num",",","n_agents",",","hidden_size",")"]
code: def init_hidden(self, ep_num):
      """function: init a hidden tensor for every agent
      input:
          ep_num: How many episodes are included in a batch of data
      output:
          rnn_h: rnn hidden state, shape (ep_num, n_agents, hidden_size)
      """
      assert hasattr(
          self.model.actor_model, "init_hidden"
      ), "actor must have rnn structure and has method 'init_hidden' to make hidden states"
      rnn_h = (
          self.model.actor_model.init_hidden()
          .unsqueeze(0)
          .expand(ep_num, self.n_agents, -1)
      )
      return rnn_h
  
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 2 for calling the COMA obj's underlying member method code with example usage: obj.init_hidden(ep_num) and returns: rnn_h