Skip to content

Commit

Permalink
[fix] eos --> <eos> (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingchensong authored Dec 12, 2023
1 parent 5887279 commit 7facff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wenet/transformer/asr_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def __init__(
super().__init__()
# note that eos is the same as sos (equivalent ID)
self.sos = (vocab_size - 1 if special_tokens is None else
special_tokens.get("sos", vocab_size - 1))
special_tokens.get("<sos>", vocab_size - 1))
self.eos = (vocab_size - 1 if special_tokens is None else
special_tokens.get("eos", vocab_size - 1))
special_tokens.get("<eos>", vocab_size - 1))
self.vocab_size = vocab_size
self.special_tokens = special_tokens
self.ignore_id = ignore_id
Expand Down

0 comments on commit 7facff5

Please sign in to comment.