- class torchrl.envs.transforms.FrameSkipTransform(frame_skip: int = 1)¶
A frame-skip transform.
This transform applies the same action repeatedly in the parent environment, which improves stability on certain training algorithms.
frame_skip (int, optional) – a positive integer representing the number of frames during which the same action must be applied.
Reads the input tensordict, and for the selected keys, applies the transform.