Which is the first pytorch version that has the pre_backward-hook?

Hi, I have a quick question. I just wanted to know which is the first version of pytorch that has the pre_backward_hook feature enabled? I’ve tried using v1.12.0 but that doesn’t have the pre_backward_hook feature.

FYI : [nn] module: full_backward_pre_hook by kshitij12345 · Pull Request #86700 · pytorch/pytorch · GitHub was the PR for implementing pre_backward_hook

I wanted this for my research purpose, as I’ve done all experiments using v1.12.0 and don’t want to use the latest versions like 2.0.

You would need to use 2.0.0 as the linked PR was merged on Oct 13, 2022 while PyTorch 1.13.0 was released Oct 28, 2022 and thus won’t contain this PR.

1 Like