Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

[BUGFIX] fix standard rnn weight sharing error #1122

Merged
merged 6 commits into from
Feb 6, 2020

Conversation

liuzh47
Copy link
Contributor

@liuzh47 liuzh47 commented Jan 19, 2020

Description

This fix addresses the standard RNN weight tied/weight sharing conflict. PR #1087 fixed weight sharing error of AWDRNN. This PR fixes the standardRNN.

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

@liuzh47 liuzh47 requested a review from a team as a code owner January 19, 2020 04:13
@codecov
Copy link

codecov bot commented Jan 19, 2020

Codecov Report

Merging #1122 into master will decrease coverage by 16.24%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1122       +/-   ##
===========================================
- Coverage   86.63%   70.39%   -16.25%     
===========================================
  Files          72       72               
  Lines        6892     6900        +8     
===========================================
- Hits         5971     4857     -1114     
- Misses        921     2043     +1122     
Impacted Files Coverage Δ
src/gluonnlp/data/candidate_sampler.py 16.32% <0.00%> (-75.52%) ⬇️
src/gluonnlp/utils/parallel.py 29.54% <0.00%> (-68.19%) ⬇️
src/gluonnlp/data/datasetloader.py 15.08% <0.00%> (-67.25%) ⬇️
src/gluonnlp/data/dataloader.py 22.41% <0.00%> (-65.52%) ⬇️
src/gluonnlp/optimizer/bert_adam.py 22.53% <0.00%> (-64.79%) ⬇️
src/gluonnlp/metric/length_normalized_loss.py 25.00% <0.00%> (-64.29%) ⬇️
src/gluonnlp/utils/parameter.py 24.19% <0.00%> (-62.91%) ⬇️
src/gluonnlp/loss/activation_regularizer.py 35.48% <0.00%> (-51.62%) ⬇️
...p/data/corpora/large_text_compression_benchmark.py 40.74% <0.00%> (-50.00%) ⬇️
src/gluonnlp/loss/loss.py 50.00% <0.00%> (-43.75%) ⬇️
... and 28 more

@liuzh47 liuzh47 changed the title fix standard rnn weight sharing error [BUGFIX] fix standard rnn weight sharing error Jan 19, 2020
@mli
Copy link
Member

mli commented Jan 19, 2020

Job PR-1122/2 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-1122/2/index.html

Copy link
Contributor

@leezu leezu left a comment

Choose a reason for hiding this comment

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

Thanks!

Both #1087 and this PR don't include any test case that runs the newly introduced branch of the condition. Could you add a test case that ensures weight sharing works for Standard RNN and AWDRNN?

Or will you make another PR shortly that relies (and thus tests) this functionality?

@leezu
Copy link
Contributor

leezu commented Feb 5, 2020

Ping @liuzh91

@liuzh47
Copy link
Contributor Author

liuzh47 commented Feb 5, 2020

Ping @liuzh91

I'll add a test case soon.

@mli
Copy link
Member

mli commented Feb 5, 2020

Job PR-1122/4 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-1122/4/index.html

@mli
Copy link
Member

mli commented Feb 5, 2020

Job PR-1122/5 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-1122/5/index.html

@mli
Copy link
Member

mli commented Feb 6, 2020

Job PR-1122/6 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-1122/6/index.html

@mli
Copy link
Member

mli commented Feb 6, 2020

Job PR-1122/7 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-1122/7/index.html

@leezu leezu merged commit a14d14e into dmlc:master Feb 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants