asyml / texar-pytorch

Integrating the Best of TF into PyTorch, for Machine Learning, Natural Language Processing, and Text Generation. This is part of the CASL project: http://casl-project.ai/
https://asyml.io
Apache License 2.0
745 stars 117 forks source link

Resolve #40: Provide option to freeze the embedding parameters #271

Closed gpengzhi closed 4 years ago

gpengzhi commented 4 years ago

resolve #40

codecov[bot] commented 4 years ago

Codecov Report

Merging #271 into master will increase coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #271      +/-   ##
=========================================
+ Coverage   83.04%   83.1%   +0.05%     
=========================================
  Files         195     195              
  Lines       15300   15316      +16     
=========================================
+ Hits        12706   12728      +22     
+ Misses       2594    2588       -6
Impacted Files Coverage Δ
texar/torch/modules/embedders/embedders.py 91.66% <ø> (ø) :arrow_up:
texar/torch/modules/embedders/embedder_utils.py 100% <ø> (ø) :arrow_up:
texar/torch/modules/embedders/embedder_base.py 94.11% <ø> (ø) :arrow_up:
...exar/torch/modules/embedders/position_embedders.py 90.43% <ø> (+5.21%) :arrow_up:
texar/torch/modules/embedders/embedders_test.py 98.11% <100%> (+0.33%) :arrow_up:

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 08136b2...b607736. Read the comment docs.

huzecong commented 4 years ago

The changes look good to me! Although not related to this PR, do you think you can add a few test cases to cover the not-yet-covered branches in position_embedders.py?

gpengzhi commented 4 years ago

The changes look good to me! Although not related to this PR, do you think you can add a few test cases to cover the not-yet-covered branches in position_embedders.py?

More unit tests added.