This causes WSJ example to fail with the following error message.
Traceback (most recent call last):
File "steps/nnet3/chain/train.py", line 622, in main
train(args, run_opts)
File "steps/nnet3/chain/train.py", line 428, in train
use_multitask_egs=use_multitask_egs)
File "steps/libs/nnet3/train/chain_objf/acoustic_model.py", line 395, in compute_preconditioning_matrix
use_multitask_egs=use_multitask_egs)
File "steps/libs/nnet3/train/common.py", line 74, in get_multitask_egs_opts
egs_suffix = ".{0}".format(archive_index) if archive_index > -1 else ""
TypeError: '>' not supported between instances of 'str' and 'int'
Changing > to != seems to solve this.
diff --git a/egs/wsj/s5/steps/libs/nnet3/train/common.py b/egs/wsj/s5/steps/libs/nnet3/train/common.py
index d052c78..b8e0322 100644
--- a/egs/wsj/s5/steps/libs/nnet3/train/common.py
+++ b/egs/wsj/s5/steps/libs/nnet3/train/common.py
@@ -71,7 +71,7 @@ def get_multitask_egs_opts(egs_dir, egs_prefix="",
"valid_diagnostic." for validation.
"""
multitask_egs_opts = ""
- egs_suffix = ".{0}".format(archive_index) if archive_index > -1 else ""
+ egs_suffix = ".{0}".format(archive_index) if archive_index != -1 else ""
if use_multitask_egs:
output_file_name = ("{egs_dir}/{egs_prefix}output{egs_suffix}.ark"
I am not sure if this is the right thing to do. Could you advice?
Hi
Sorry if this is duplicated issue.
It seems that
archive_index
argument in get_multitask_egs_opts function is expected to be integer,but compute_preconditioning_matrix is passing a string object.
This causes WSJ example to fail with the following error message.
Changing
>
to!=
seems to solve this.I am not sure if this is the right thing to do. Could you advice?