Shortcuts

VideoRecorder

torchrl.record.VideoRecorder(logger: Logger, tag: str, in_keys: Optional[Sequence[str]] = None, skip: int = 2, center_crop: Optional[int] = None, make_grid: bool = True, **kwargs) None[source]

Video Recorder transform.

Will record a series of observations from an environment and write them to a Logger object when needed.

Parameters:
  • logger (Logger) – a Logger instance where the video should be written.

  • tag (str) – the video tag in the logger.

  • in_keys (Sequence[str], optional) – keys to be read to produce the video. Default is "pixels".

  • skip (int) – frame interval in the output video. Default is 2.

  • center_crop (int, optional) – value of square center crop.

  • make_grid (bool, optional) – if True, a grid is created assuming that a tensor of shape [B x W x H x 3] is provided, with B being the batch size. Default is True.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources