Skip to content

[Variable] Remove the tensor initialization from Variable. NFC. #1365

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

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

nadavrot
Copy link
Contributor

This commit removes the initialization code from Variable and moves it to the code that creates the variable. After this change Tensors needs to be initialized externally and not by the Variable constructor like they are today. This is a pretty big patch that touches many many files, but most of the changes are mechanical.

I tried to make this patch as simple as possible and there are still a few things that we need to clean up. For example, the default values for arguments don't make sense in a few places. We should change the boolean training flag to an enum, etc.

Copy link
Contributor

@rdzhabarov rdzhabarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rdzhabarov
Copy link
Contributor

rdzhabarov commented Jul 31, 2018

Feel free to merge after resolving conflicts, it's easy to get conflicts with this PR.

@nadavrot nadavrot merged commit ab61f6e into pytorch:master Jul 31, 2018
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.

3 participants