Skip to content

Commit

Permalink
Replace register_backward_hook with register_full_backward_hook
Browse files Browse the repository at this point in the history
Summary: register_backward_hook is deprecated.

Differential Revision: D68562558
  • Loading branch information
iden-kalemaj authored and facebook-github-bot committed Jan 23, 2025
1 parent ea4cb95 commit a9c8e84
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 a9c8e84

Please sign in to comment.