Feature Request: add an additional argument to auto_optim to allow for gradient accumulation
See original GitHub issueWhen we use horovod backend and perform gradient accumulation, we get the following error:
AssertionError: Gradients were computed more than backward_passes_per_step times before call to step(). Increase backward_passes_per_step to accumulate gradients locally.
Thus, we need to change the default argument backward_passes_per_step
of horovod.DistributedOptimizer
to enable gradient accumulation in the distributed setting. To do so, we can add this argument to ignite.distributed.auto_optim
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Gradient accumulation trick and Activation Checkpointing ...
Feature request Adds gradient accumulation trick to ... Adds Activation Checkpointing feature Motivation For GPU memory issue as well...
Read more >Performing gradient accumulation with Accelerate
Gradient accumulation is a technique where you can train on bigger batch sizes than your machine would normally be able to fit into...
Read more >Gradient Accumulation: Overcoming Memory Constraints in ...
So the question you want to ask is: why does the remaining 5% need something else. In order to answer, let's check out...
Read more >Gradient Accumulation in PyTorch - Nikita Kozodoi
Now let's implement gradient accumulation! There are three things we need to do: Specify the accum_iter parameter. This is just an integer value ......
Read more >Gradient Accumulation with Custom model.fit in TF.Keras?
The reason is if we want to get the benefit of keras built-in functionality like fit , callbacks , we don't want to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ohk… Got it… Can i work on it?
@sandylaker thanks for the feature request ! Maybe, we can enable kwargs for
auto_optim
as it is done forauto_model
. In the docs we can explicitly say where kwargs goes exactly.