l5kit.environment.feature_extractor module¶
- class l5kit.environment.feature_extractor.CustomFeatureExtractor(observation_space: gym.spaces.dict.Dict, features_dim: int = 256, model_arch: str = 'simple_gn')¶
Bases:
stable_baselines3.common.torch_layers.BaseFeaturesExtractor
Custom feature extractor from raster images for the RL Policy.
- Parameters
observation_space – the input observation space
features_dim – the number of features to extract from the input
model_arch – the model architecture used to extract the features
- forward(observations: gym.spaces.dict.Dict) torch.Tensor ¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶