Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty Variables to be saved for backwards #23618

Closed
wants to merge 1 commit into from

Conversation

malvika2147
Copy link

@malvika2147 malvika2147 commented Jul 31, 2019

Stack from ghstack:

Summary: For example: save_for_backward({Variable(), x, Variable()}) should be allowed, so that this is consistent with the python API behaviour.

Test Plan: Added a test similar to the python test test_save_none_for_backward from test_autograd.py.

Differential Revision: D16589402

Summary: For example: `save_for_backward({Variable(), x, Variable()})` should be allowed, so that this is consistent with the python API behaviour.

Test Plan: Added a test.

Reviewers:

Subscribers:

Tasks:

Tags:
@pytorchbot pytorchbot added module: autograd Related to torch.autograd, and the autograd engine in general module: cpp Related to C++ API labels Jul 31, 2019
@malvika2147 malvika2147 requested a review from ezyang July 31, 2019 20:56
@zou3519 zou3519 deleted the gh/mal2147/18/head branch August 1, 2019 02:54
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ec13f18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged module: autograd Related to torch.autograd, and the autograd engine in general module: cpp Related to C++ API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants