ExcludeTransform¶
- class torchrl.envs.transforms.ExcludeTransform(*excluded_keys)[source]¶
Excludes keys from the input tensordict.
- Parameters:
*excluded_keys (iterable of NestedKey) – The name of the keys to exclude. If the key is not present, it is simply ignored.
- forward(tensordict: TensorDictBase) TensorDictBase ¶
Reads the input tensordict, and for the selected keys, applies the transform.
- transform_observation_spec(observation_spec: TensorSpec) TensorSpec [source]¶
Transforms the observation spec such that the resulting spec matches transform mapping.
- Parameters:
observation_spec (TensorSpec) – spec before the transform
- Returns:
expected spec after the transform