class_docstr: Configuration for an ActorCriticEncoder.
  
  The base encoder functions like other encoders in RLlib. It is wrapped by the
  ActorCriticEncoder to provides a shared encoder Model to use in RLModules that
  provides twofold outputs: one for the actor and one for the critic. See
  ModelConfig for usage details.
  
  Attributes:
      base_encoder_config: The configuration for the wrapped encoder(s).
      shared: Whether the base encoder is shared between the actor and critic.
class_docstr_tok: ["Configuration","for","an","ActorCriticEncoder",".","The","base","encoder","functions","like","other","encoders","in","RLlib",".","It","is","wrapped","by","the","ActorCriticEncoder","to","provides","a","shared","encoder","Model","to","use","in","RLModules","that","provides","twofold","outputs",":","one","for","the","actor","and","one","for","the","critic",".","See","ModelConfig","for","usage","details",".","Attributes",":","base_encoder_config",":","The","configuration","for","the","wrapped","encoder","(","s",")",".","shared",":","Whether","the","base","encoder","is","shared","between","the","actor","and","critic","."]
code: def build(self, framework: str = "torch") -> "Encoder":
      if framework == "torch":
          from ray.rllib.core.models.torch.encoder import (
              TorchActorCriticEncoder,
              TorchStatefulActorCriticEncoder,
          )
  
          if isinstance(
              self.base_encoder_config, RecurrentEncoderConfig
          ):
              return TorchStatefulActorCriticEncoder(self)
          else:
              return TorchActorCriticEncoder(self)
      else:
          from ray.rllib.core.models.tf.encoder import (
              TfActorCriticEncoder,
              TfStatefulActorCriticEncoder,
          )
  
          if isinstance(
              self.base_encoder_config, RecurrentEncoderConfig
          ):
              return TfStatefulActorCriticEncoder(self)
          else:
              return TfActorCriticEncoder(self)
  
imports: import abc
  from dataclasses import dataclass, field
  import functools
  from typing import Callable, Dict, List, Optional, Tuple, TYPE_CHECKING, Union
  import numpy
  from ray.rllib.models.torch.misc import same_padding, same_padding_transpose_after_stride, valid_padding
  from ray.rllib.models.utils import get_activation_fn, get_initializer_fn
  from ray.rllib.utils.annotations import ExperimentalAPI
label_desc: Use image node_id 1 for calling the ActorCriticEncoderConfig obj's underlying member method code with example usage: obj.build(framework) and returns: TorchStatefulActorCriticEncoder, TorchActorCriticEncoder, TfStatefulActorCriticEncoder, TfActorCriticEncoder