Skip to content

Commit 3668cd1

Browse files
committed
small fix
1 parent 1a44ef3 commit 3668cd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

users/zeyer/experiments/exp2024_04_23_baselines/ctc_recog_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def _calc_next_lm_state(self, state: LMState):
504504
if state_.label_seq == [model.bos_idx]:
505505
prev_lm_state = lm_initial_state
506506
else:
507-
prev_lm_state, _ = self._calc_next_lm_state.cache_peek(state_.prev_state)
507+
prev_lm_state, _ = self._calc_next_lm_state.cache_peek(state_.prev_state, fallback=(None, None))
508508
if prev_lm_state is not None or lm_initial_state is None:
509509
# We have the prev state, or there is no state at all.
510510
# So we can do a single step.

0 commit comments

Comments
 (0)