class_docstr: Defines an abstract neural network model for use with RLlib.
  
  Custom models should extend either TFModelV2 or TorchModelV2 instead of
  this class directly.
  
  Data flow:
      obs -> forward() -> model_out
          \-> value_function() -> V(s)
class_docstr_tok: ["Defines","an","abstract","neural","network","model","for","use","with","RLlib",".","Custom","models","should","extend","either","TFModelV2","or","TorchModelV2","instead","of","this","class","directly",".","Data","flow",":","obs","-",">","forward","(",")","-",">","model_out","\\-",">","value_function","(",")","-",">","V","(","s",")"]
docstr: Get the initial recurrent state values for the model.
  
  Returns:
      List of np.array (for tf) or Tensor (for torch) objects containing the
      initial hidden state of an RNN, if applicable.
  
  .. testcode::
      :skipif: True
  
      import numpy as np
      from ray.rllib.models.modelv2 import ModelV2
      class MyModel(ModelV2):
          # ...
          def get_initial_state(self):
              return [
                  np.zeros(self.cell_size, np.float32),
                  np.zeros(self.cell_size, np.float32),
              ]
docstr_tok: ["Get","the","initial","recurrent","state","values","for","the","model",".","Returns",":","List","of","np.array","(","for","tf",")","or","Tensor","(","for","torch",")","objects","containing","the","initial","hidden","state","of","an","RNN",",","if","applicable",".","..","testcode",":",":",":","skipif",":","True","import","numpy","as","np","from","ray.rllib.models.modelv2","import","ModelV2","class","MyModel","(","ModelV2",")",":","#","...","def","get_initial_state","(","self",")",":","return","[","np.zeros","(","self.cell_size",",","np.float32",")",",","np.zeros","(","self.cell_size",",","np.float32",")",",","]"]
code: def get_initial_state(self) -> List[TensorType]:
      """Get the initial recurrent state values for the model.
  
      Returns:
          List of np.array (for tf) or Tensor (for torch) objects containing the
          initial hidden state of an RNN, if applicable.
  
      .. testcode::
          :skipif: True
  
          import numpy as np
          from ray.rllib.models.modelv2 import ModelV2
          class MyModel(ModelV2):
              # ...
              def get_initial_state(self):
                  return [
                      np.zeros(self.cell_size, np.float32),
                      np.zeros(self.cell_size, np.float32),
                  ]
      """
      return []
  
imports: from collections import OrderedDict
  import contextlib
  import gymnasium
  from gymnasium.spaces import Space
  import numpy
  from typing import Dict, List, Any, Union
  from ray.rllib.models.preprocessors import get_preprocessor, RepeatedValuesPreprocessor
  from ray.rllib.models.repeated_values import RepeatedValues
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.view_requirement import ViewRequirement
  from ray.rllib.utils import NullContextManager
  from ray.rllib.utils.annotations import DeveloperAPI, PublicAPI
  from ray.rllib.utils.deprecation import Deprecated
  from ray.rllib.utils.framework import try_import_tf, try_import_torch, TensorType
  from ray.rllib.utils.spaces.repeated import Repeated
  from ray.rllib.utils.typing import ModelConfigDict, ModelInputDict, TensorStructType
label_desc: Use image node_id 2 for calling the ModelV2 obj's underlying member method code with example usage: obj.get_initial_state() and returns: list