Fix an error when attention decoder rescoring returns None. (#90)

This commit is contained in:
Fangjun Kuang 2021-10-22 19:52:25 +08:00 committed by GitHub
parent 902e0b238d
commit 712ead8207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -66,11 +66,8 @@ to install ``lhotse``.
(3) Download icefall (3) Download icefall
-------------------- --------------------
``icefall`` is a collection of Python scripts, so you don't need to install it ``icefall`` is a collection of Python scripts; what you need is to download it
and we don't provide a ``setup.py`` to install it. and set the environment variable ``PYTHONPATH`` to point to it.
What you need is to download it and set the environment variable ``PYTHONPATH``
to point to it.
Assume you want to place ``icefall`` in the folder ``/tmp``. The Assume you want to place ``icefall`` in the folder ``/tmp``. The
following commands show you how to setup ``icefall``: following commands show you how to setup ``icefall``:

View File

@ -385,7 +385,7 @@ def decode_one_batch(
ans[lm_scale_str] = hyps ans[lm_scale_str] = hyps
else: else:
for lm_scale in lm_scale_list: for lm_scale in lm_scale_list:
ans[lm_scale_str] = [[] * lattice.shape[0]] ans[f"{lm_scale}"] = [[] * lattice.shape[0]]
return ans return ans