Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.57 KB

data_augmentation.rst

File metadata and controls

56 lines (38 loc) · 1.57 KB

Data Augmentation

d3rlpy.augmentation

d3rlpy provides data augmentation techniques tightly integrated with reinforcement learning algorithms.

  1. Kostrikov et al., Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels.
  2. Laskin et al., Reinforcement Learning with Augmented Data.

Efficient data augmentation potentially boosts algorithm performance significantly.

from d3rlpy.algos import DiscreteCQL

# choose data augmentation types
cql = DiscreteCQL(augmentation=['random_shift', 'intensity'],
                  n_augmentations=2)

You can also tune data augmentation parameters by yourself.

from d3rlpy.augmentation.image import RandomShift

random_shift = RandomShift(shift_size=10)

cql = DiscreteCQL(augmentation=[random_shift, 'intensity'],
                  n_augmentations=2)

Image Observation

d3rlpy.augmentation.image.RandomShift d3rlpy.augmentation.image.Cutout d3rlpy.augmentation.image.HorizontalFlip d3rlpy.augmentation.image.VerticalFlip d3rlpy.augmentation.image.RandomRotation d3rlpy.augmentation.image.Intensity d3rlpy.augmentation.image.ColorJitter

Vector Observation

d3rlpy.augmentation.vector.SingleAmplitudeScaling d3rlpy.augmentation.vector.MultipleAmplitudeScaling