Skip to content

Commit

Permalink
Change register_backward_hook to register_full_backward_hook
Browse files Browse the repository at this point in the history
Summary: register_backward_hook is getting deprecated so we merge it to register_full_backward_hook

Differential Revision: D48725761
  • Loading branch information
HuanyuZhang authored and facebook-github-bot committed Jun 10, 2024
1 parent 202c58a commit 4440412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opacus/grad_sample/grad_sample_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def add_hooks(
)

self.autograd_grad_sample_hooks.append(
module.register_backward_hook(
module.register_full_backward_hook(
partial(
self.capture_backprops_hook,
loss_reduction=loss_reduction,
Expand Down

0 comments on commit 4440412

Please sign in to comment.