Skip to content

Properly update _flat_weights in RNN models#32989

Closed
ngimel wants to merge 2 commits intopytorch:masterfrom
ngimel:flat_weight3
Closed

Properly update _flat_weights in RNN models#32989
ngimel wants to merge 2 commits intopytorch:masterfrom
ngimel:flat_weight3

Conversation

@ngimel
Copy link
Collaborator

@ngimel ngimel commented Feb 4, 2020

Resubmitting #32939
Should fix #32346 hopefully. Now when _flat_weights list is updated, None elements are appended to it if some weights are missing, subsequent setattr calls for the missing weights should repair _flat_weights and make it suitable to use in the backend.

Natalia Gimelshein added 2 commits February 4, 2020 15:07
Summary:
Should fix pytorch#32346 hopefully. Now when _flat_weights list is updated, `None` elements are appended to it if some weights are missing, subsequent `setattr` calls for the missing weights should repair _flat_weights and make it suitable to use in the backend.
Pull Request resolved: pytorch#32939

Differential Revision: D19710990

Pulled By: ngimel

fbshipit-source-id: c978c7519464e94beeffa9bc33b9172854a2f298
@ngimel ngimel requested a review from apaszke as a code owner February 4, 2020 23:09
@ngimel ngimel requested a review from cpuhrsch February 4, 2020 23:09
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ngimel has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ngimel merged this pull request in e858186.

BowenBao pushed a commit to BowenBao/pytorch that referenced this pull request Feb 12, 2020
Summary:
Resubmitting pytorch#32939
Should fix pytorch#32346 hopefully. Now when _flat_weights list is updated, None elements are appended to it if some weights are missing, subsequent setattr calls for the missing weights should repair _flat_weights and make it suitable to use in the backend.
Pull Request resolved: pytorch#32989

Differential Revision: D19731952

Pulled By: ngimel

fbshipit-source-id: 2118a19840491e7ab0fef15185fad982f42795a6
ttumiel pushed a commit to ttumiel/pytorch that referenced this pull request Mar 4, 2020
Summary:
Resubmitting pytorch#32939
Should fix pytorch#32346 hopefully. Now when _flat_weights list is updated, None elements are appended to it if some weights are missing, subsequent setattr calls for the missing weights should repair _flat_weights and make it suitable to use in the backend.
Pull Request resolved: pytorch#32989

Differential Revision: D19731952

Pulled By: ngimel

fbshipit-source-id: 2118a19840491e7ab0fef15185fad982f42795a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pytorch 1.4.0 weight drop - 'LSTM' object has no attribute 'weight_hh_l0'

4 participants