How to accumulate gradients and update altogether?

You could accumulate the gradient for a few samples and call the optimizer after these steps.
This post might help.

1 Like