❓ How to use Gradient Accumulator in TF_Trainer ?
# ❓ Questions & Help

According to the documentation of Gradient Accumulator :

> the accumulator should be called in a
  replica context. Gradients will be accumulated locally on each replica and
  without synchronization. Users should then call ``.gradients``, scale the
  gradients if required, and pass the result to ``apply_gradients``.

The default optimizer for TF_Trainer does not provide gradient accumulation.

**Is there any example available showing how to use Gradient Accumulator with TF_Trainer ?**
Hello!

The usage of the gradient accumulator is fully integrated since the beginning in the TF Trainer, the default value of accumulation is 1, if you want to change it you have to fill the `--gradient_accumulation_steps` parameter.<|||||>That's awesome ! Thank you very much for your answer