Skip to content

Commit

Permalink
Fix padding_idx (#942)
Browse files Browse the repository at this point in the history
* fix padding_idx

* update RESULTS.md
  • Loading branch information
marcoyang1998 authored Mar 10, 2023
1 parent 28af269 commit 9ddd811
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions egs/librispeech/ASR/RESULTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ for m in greedy_search fast_beam_search modified_beam_search ; do
done
```

Note that a small change is made to the `pruned_transducer_stateless7/decoder.py` in
this [PR](/ceph-data4/yangxiaoyu/softwares/icefall_development/icefall_random_padding/egs/librispeech/ASR/pruned_transducer_stateless7/exp_960h_no_paddingidx_ngpu4/tensorboard) to address the
problem of emitting the first symbol at the very beginning. If you need a
model without this issue, please download the model from here: <https://huggingface.co/marcoyang/icefall-asr-librispeech-pruned-transducer-stateless7-2023-03-10>

### LibriSpeech BPE training results (Pruned Stateless LSTM RNN-T + gradient filter)

Expand Down
1 change: 0 additions & 1 deletion egs/librispeech/ASR/pruned_transducer_stateless/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def __init__(
self.embedding = nn.Embedding(
num_embeddings=vocab_size,
embedding_dim=embedding_dim,
padding_idx=blank_id,
)
self.blank_id = blank_id
self.unk_id = unk_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def __init__(
self.embedding = ScaledEmbedding(
num_embeddings=vocab_size,
embedding_dim=decoder_dim,
padding_idx=blank_id,
)
self.blank_id = blank_id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def __init__(
self.embedding = nn.Embedding(
num_embeddings=vocab_size,
embedding_dim=decoder_dim,
padding_idx=blank_id,
)
self.blank_id = blank_id

Expand Down

0 comments on commit 9ddd811

Please sign in to comment.