oljike commented on issue #16969: Gradient accumulation in Module
URL: 
https://github.com/apache/incubator-mxnet/issues/16969#issuecomment-563903578
 
 
   Actually, I have resolved the problem. The key thing is to zero the 
gradients which are backwarded to the first model by 
   `model_2._exec_group.shared_data_arrays[0]['grad of data_2'] *= 0`
   Also, rescale grad should be the same as in the desired batch size mode.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to