mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-14 04:22:21 +00:00
Bug fixes in conformer_bn dir
This commit is contained in:
parent
6636c05f12
commit
2582c5fe78
@ -246,7 +246,7 @@ class DiscreteBottleneck(nn.Module):
|
|||||||
self.class_probs = (self.class_probs * self.class_probs_decay +
|
self.class_probs = (self.class_probs * self.class_probs_decay +
|
||||||
mean_class_probs * (1.0 - self.class_probs_decay))
|
mean_class_probs * (1.0 - self.class_probs_decay))
|
||||||
prob_floor = self.min_prob_ratio / self.classes_per_group
|
prob_floor = self.min_prob_ratio / self.classes_per_group
|
||||||
self.class_offsets += (self.class_probs > prob_floor) * self.prob_boost
|
self.class_offsets += (self.class_probs < prob_floor) * self.prob_boost
|
||||||
|
|
||||||
else:
|
else:
|
||||||
x = torch.softmax(x, dim=-1)
|
x = torch.softmax(x, dim=-1)
|
||||||
|
@ -21,25 +21,6 @@
|
|||||||
# 6000 of epoch 15. was 0.429 last time the valid loss was printed on
|
# 6000 of epoch 15. was 0.429 last time the valid loss was printed on
|
||||||
# epoch 14.
|
# epoch 14.
|
||||||
|
|
||||||
|
|
||||||
# RESULTS (it's worse!), with:
|
|
||||||
# python3 conformer_ctc_bn/decode.py --lattice-score-scale=0.5 --method=attention-decoder --epoch=25 --avg=10 --max-duration=30
|
|
||||||
#
|
|
||||||
# With sampling in test-time:
|
|
||||||
# ngram_lm_scale_1.2_attention_scale_1.5 3.48 best for test-clean
|
|
||||||
# ngram_lm_scale_0.9_attention_scale_1.2 8.4 best for test-other
|
|
||||||
|
|
||||||
# After I modified conformer.py so that in eval mode, it uses the softmax output with no sampling:
|
|
||||||
# ngram_lm_scale_0.9_attention_scale_1.2 3.44 best for test-clean
|
|
||||||
# ngram_lm_scale_0.9_attention_scale_1.0 8.09 best for test-other
|
|
||||||
|
|
||||||
# Vs. BASELINE:
|
|
||||||
# evaluated with
|
|
||||||
# python3 conformer_ctc/decode.py --lattice-score-scale=0.5 --method=attention-decoder --epoch=23 --avg=10 --max-duration=30 &
|
|
||||||
# (also uses foam optimizer)
|
|
||||||
# ngram_lm_scale_1.2_attention_scale_1.2 2.8 best for test-clean
|
|
||||||
# ngram_lm_scale_0.9_attention_scale_0.7 6.6 best for test-other
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user