[rllib] Add microbatch optimizer with A2C example (#6161)

This commit is contained in:
Eric Liang
2019-11-14 12:14:00 -08:00
committed by GitHub
parent 0a3623ded6
commit 243b1b7281
5 changed files with 178 additions and 0 deletions
+2
View File
@@ -126,6 +126,8 @@ Advantage Actor-Critic (A2C, A3C)
`[paper] <https://arxiv.org/abs/1602.01783>`__ `[implementation] <https://github.com/ray-project/ray/blob/master/rllib/agents/a3c/a3c.py>`__
RLlib implements A2C and A3C using SyncSamplesOptimizer and AsyncGradientsOptimizer respectively for policy optimization. These algorithms scale to up to 16-32 worker processes depending on the environment. Both a TensorFlow (LSTM), and PyTorch version are available.
A2C also supports microbatching (i.e., gradient accumulation), which can be enabled by setting the ``microbatch_size`` config. Microbatching allows for training with a ``train_batch_size`` much larger than GPU memory. See also the `microbatch optimizer implementation <https://github.com/ray-project/ray/blob/master/rllib/optimizers/microbatch_optimizer.py>`__.
.. figure:: a2c-arch.svg
A2C architecture