Skip to content

Fix gradient based error when torch.autograd.grad returns None#1798

Open
styusuf wants to merge 1 commit intometa-pytorch:masterfrom
styusuf:export-D96917217
Open

Fix gradient based error when torch.autograd.grad returns None#1798
styusuf wants to merge 1 commit intometa-pytorch:masterfrom
styusuf:export-D96917217

Conversation

@styusuf
Copy link
Contributor

@styusuf styusuf commented Mar 17, 2026

Summary: Fix None values from autograd.grad crashing workflow for gradient based NI. Replace Nones with tensor of zeros (which will just output zero attribution for the target)

Differential Revision: D96917217

Summary: Fix None values from autograd.grad crashing workflow for gradient based NI. Replace Nones with tensor of zeros (which will just output zero attribution for the target)

Differential Revision: D96917217
@meta-cla meta-cla bot added the cla signed label Mar 17, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Mar 17, 2026

@styusuf has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96917217.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant