Resize¶
- class torchrl.envs.transforms.Resize(w: int, h: int, interpolation: str = 'bilinear', in_keys: Optional[Sequence[Union[str, Tuple[str, ...]]]] = None, out_keys: Optional[Sequence[Union[str, Tuple[str, ...]]]] = None)[source]¶
Resizes a pixel observation.
- Parameters:
w (int) – resulting width
h (int) – resulting height
interpolation (str) – interpolation method
- 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