d3rlpy.datasets.get_pendulum

d3rlpy.datasets.get_pendulum(as_tensor=False, device=None)[source]

Returns pendulum dataset and environment.

The dataset is automatically downloaded to d3rlpy_data/pendulum.pkl if it does not exist.

Parameters:
  • as_tensor (bool) – flag to hold observations as torch.Tensor.
  • device (d3rlpy.gpu.Device or int) – gpu device or device id for tensor.
Returns:

tuple of d3rlpy.dataset.MDPDataset and gym environment.

Return type:

tuple