You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
optimizer.py
in horovod pytorch DistributedOptimizer code, why register hook on tmp parameter not the real parameter.
forparam_groupinself.param_groups:
forpinparam_group['params']:
ifp.requires_grad:
self._requires_update.add(p)
p_tmp=p.expand_as(p)
# why get the p_tmp grad_acc, does just set p.register_hook() not work ?grad_acc=p_tmp.grad_fn.next_functions[0][0]
grad_acc.register_hook(self._make_hook(p))
self._grad_accs.append(grad_acc)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
optimizer.py
in horovod pytorch DistributedOptimizer code, why register hook on tmp parameter not the real parameter.
Beta Was this translation helpful? Give feedback.
All reactions