Skip to content

Conversation

zlinao
Copy link

@zlinao zlinao commented Jan 7, 2020

Currently the PreTrainedEncoderDecoder class fails to initialize the "cross-attention layer" since it updates decoder.config.is_decoder = True after decoder initialization.

@codecov-io
Copy link

codecov-io commented Jan 7, 2020

Codecov Report

Merging #2435 into master will decrease coverage by <.01%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2435      +/-   ##
==========================================
- Coverage   73.24%   73.24%   -0.01%     
==========================================
  Files          87       87              
  Lines       15001    15004       +3     
==========================================
+ Hits        10988    10989       +1     
- Misses       4013     4015       +2
Impacted Files Coverage Δ
src/transformers/modeling_encoder_decoder.py 25.58% <25%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9261c7f...b4418d3. Read the comment docs.

@LysandreJik
Copy link
Member

Indeed, the cross attention is initialized in BertLayer and needs knowledge of the is_decoder boolean to ensure it is correctly initialized.

Looks good to me, thanks @zlinao

@LysandreJik LysandreJik requested a review from thomwolf January 9, 2020 11:29
@zlinao
Copy link
Author

zlinao commented Jan 10, 2020

Indeed, the cross attention is initialized in BertLayer and needs knowledge of the is_decoder boolean to ensure it is correctly initialized.

Looks good to me, thanks @zlinao

Yes, exactly.

mgoldey added a commit to greenkeytech/transformers that referenced this pull request Mar 11, 2020
@stale
Copy link

stale bot commented Mar 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 17, 2020
@mgoldey mgoldey mentioned this pull request Mar 23, 2020
@stale stale bot closed this Mar 24, 2020
mgoldey added a commit to greenkeytech/transformers that referenced this pull request Mar 31, 2020
mgoldey added a commit to greenkeytech/transformers that referenced this pull request Apr 22, 2020
mgoldey added a commit to greenkeytech/transformers that referenced this pull request Apr 30, 2020
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.

3 participants