Closed hy-struggle closed 4 years ago
Merging #300 into master will decrease coverage by
0.11%
. The diff coverage is66.66%
.
@@ Coverage Diff @@
## master #300 +/- ##
==========================================
- Coverage 78.57% 78.45% -0.12%
==========================================
Files 95 95
Lines 12569 12571 +2
==========================================
- Hits 9876 9863 -13
- Misses 2693 2708 +15
Impacted Files | Coverage Δ | |
---|---|---|
fastNLP/modules/utils.py | 85.71% <66.66%> (-0.96%) |
:arrow_down: |
fastNLP/core/callback.py | 71.00% <0.00%> (-1.73%) |
:arrow_down: |
fastNLP/modules/generator/seq2seq_generator.py | 75.61% <0.00%> (-1.24%) |
:arrow_down: |
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 1f27d00...26601ce. Read the comment docs.
Description: 修改了modules/utils.py中
initial_parameter()
函数的bugMain reason: 函数默认情况下使用
init.xavier_normal_()
初始化,但例如BatchNorm和LayerNorm这样的参数维度为1的层是不能使用这种初始化的。报错为
ValueError: Fan in and fan out can not be computed for tensor with less than 2 dimensions
。Changes: 逐项描述修改的内容
init.normal_()
初始化。Mention: 找人review你的PR
@xpqiu