pytorch
9cb2871f - Fix forward-mode AD formula for binary_cross_entropy_with_logits

Commit
2 years ago
Fix forward-mode AD formula for binary_cross_entropy_with_logits The problem was that `grad_input` and `grad_target` may be ZeroTensors, which are immutable. This PR changes it so that operations on grad_input and grad_target in `binary_cross_entropy_with_logits_jvp` are no longer in-place. Test Plan: - run existing tests Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/76322 Approved by: https://github.com/soulitzer
Author
Committer
Parents
Loading