lit_sb3.modules.feature_extractors.combined
source module lit_sb3.modules.feature_extractors.combined
Classes
-
CombinedExtractor — Combined features extractor for Dict observation spaces.
source class CombinedExtractor(observation_space: spaces.Dict, cnn_output_dim: int = 256, normalized_image: bool = False)
Bases : BaseFeaturesExtractor
Combined features extractor for Dict observation spaces.
Builds a features extractor for each key of the space. Input from each space is fed through a separate submodule (CNN or MLP, depending on input shape), the output features are concatenated and fed through additional MLP network ("combined").
Parameters
-
observation_space : spaces.Dict
-
cnn_output_dim : int — Number of features to output from each CNN submodule(s). Defaults to 256 to avoid exploding network sizes.
-
normalized_image : bool — Whether to assume that the image is already normalized or not (this disables dtype and bounds checks): when True, it only checks that the space is a Box and has 3 dimensions. Otherwise, it checks that it has expected dtype (uint8) and bounds (values in [0, 255]).
Attributes
-
features_dim : int — The number of features that the extractor outputs.
Methods
source method CombinedExtractor.forward(observations: TensorDict) → torch.Tensor