class_docstr: Framework-agnostic base class for RLlib models.
  
  Models are low-level neural network components that offer input- and
  output-specification, a forward method, and a get_initial_state method. Models
  are composed in RLModules.
  
  Usage Example together with ModelConfig:
  
  .. testcode::
  
      from ray.rllib.core.models.base import Model
      from ray.rllib.core.models.configs import ModelConfig
      from dataclasses import dataclass
  
      class MyModel(Model):
          def __init__(self, config):
              super().__init__(config)
              self.my_param = config.my_param * 2
  
          def _forward(self, input_dict):
              return input_dict["obs"] * self.my_param
  
  
      @dataclass
      class MyModelConfig(ModelConfig):
          my_param: int = 42
  
          def build(self, framework: str):
              if framework == "bork":
                  return MyModel(self)
  
  
      config = MyModelConfig(my_param=3)
      model = config.build(framework="bork")
      print(model._forward({"obs": 1}))
  
  .. testoutput::
  
      6
class_docstr_tok: ["Framework-agnostic","base","class","for","RLlib","models",".","Models","are","low-level","neural","network","components","that","offer","input-","and","output-specification",",","a","forward","method",",","and","a","get_initial_state","method",".","Models","are","composed","in","RLModules",".","Usage","Example","together","with","ModelConfig",":","..","testcode",":",":","from","ray.rllib.core.models.base","import","Model","from","ray.rllib.core.models.configs","import","ModelConfig","from","dataclasses","import","dataclass","class","MyModel","(","Model",")",":","def","__init__","(","self",",","config",")",":","super","(",")",".__init__","(","config",")","self.my_param","=","config.my_param","*","2","def","_forward","(","self",",","input_dict",")",":","return","input_dict","[","``","obs","''","]","*","self.my_param","@","dataclass","class","MyModelConfig","(","ModelConfig",")",":","my_param",":","int","=","42","def","build","(","self",",","framework",":","str",")",":","if","framework","==","``","bork","''",":","return","MyModel","(","self",")","config","=","MyModelConfig","(","my_param=3",")","model","=","config.build","(","framework=","''","bork","''",")","print","(","model._forward","(","{","``","obs","''",":","1","}",")",")","..","testoutput",":",":","6"]
docstr: Called automatically after the __init__ method of the subclasses.
  
  The module first calls the __init__ method of the subclass, With in the
  __init__ you should call the super().__init__ method. Then after the __init__
  method of the subclass is called, the __post_init__ method is called.
  
  This is a good place to do any initialization that requires access to the
  subclass's attributes.
code: def __post_init__(self):
      """Called automatically after the __init__ method of the subclasses.
  
      The module first calls the __init__ method of the subclass, With in the
      __init__ you should call the super().__init__ method. Then after the __init__
      method of the subclass is called, the __post_init__ method is called.
  
      This is a good place to do any initialization that requires access to the
      subclass's attributes.
      """
      self._input_specs = self.get_input_specs()
      self._output_specs = self.get_output_specs()
  
imports: import abc
  from typing import List, Optional, Tuple, Union
  from ray.rllib.core.models.configs import ModelConfig
  from ray.rllib.core.models.specs.specs_base import Spec
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.rnn_sequencing import get_fold_unfold_fns
  from ray.rllib.utils.annotations import ExperimentalAPI, DeveloperAPI
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.typing import TensorType
label_desc: Use image node_id 3 for calling the Model obj's underlying member method code with example usage: obj.__post_init__() without return types