class_docstr: A stateful actor-critic encoder for torch.
code: def __init__(self, config: ActorCriticEncoderConfig) -> None:
      # We have to call TfModel.__init__ first, because it calls the constructor of
      # tf.keras.Model, which is required to be called before models are created.
      TfModel.__init__(self, config)
      StatefulActorCriticEncoder.__init__(self, config)
  
imports: from typing import Optional
  import tree
  from ray.rllib.core.models.base import Encoder, ActorCriticEncoder, StatefulActorCriticEncoder, STATE_IN, STATE_OUT, ENCODER_OUT, tokenize
  from ray.rllib.core.models.base import Model
  from ray.rllib.core.models.configs import ActorCriticEncoderConfig, CNNEncoderConfig, MLPEncoderConfig, RecurrentEncoderConfig
  from ray.rllib.core.models.tf.base import TfModel
  from ray.rllib.core.models.tf.primitives import TfMLP, TfCNN
  from ray.rllib.core.models.specs.specs_base import Spec
  from ray.rllib.core.models.specs.specs_dict import SpecDict
  from ray.rllib.core.models.specs.specs_base import TensorSpec
  from ray.rllib.models.utils import get_initializer_fn
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.nested_dict import NestedDict
label_desc: Use image node_id 1 to create a new TfStatefulActorCriticEncoder object from inherited base classes: TfModel, StatefulActorCriticEncoder with example: obj = TfStatefulActorCriticEncoder(config)