from local
This commit is contained in:
parent
6bab522557
commit
f7950e6bdb
Binary file not shown.
@ -308,8 +308,6 @@ def get_parser() -> argparse.ArgumentParser:
|
|||||||
"--interctc-weight",
|
"--interctc-weight",
|
||||||
type=float,
|
type=float,
|
||||||
default=0.3,
|
default=0.3,
|
||||||
help="""Number of steps that affects how rapidly the learning rate
|
|
||||||
decreases. We suggest not to change this.""",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_model_arguments(parser)
|
add_model_arguments(parser)
|
||||||
@ -565,13 +563,13 @@ def compute_loss(
|
|||||||
allow_truncate=params.subsampling_factor - 1,
|
allow_truncate=params.subsampling_factor - 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
ctc_loss = 0.7* k2.ctc_loss(
|
ctc_loss = (1-params.interctc_weight)* k2.ctc_loss(
|
||||||
decoding_graph=decoding_graph,
|
decoding_graph=decoding_graph,
|
||||||
dense_fsa_vec=dense_fsa_vec1,
|
dense_fsa_vec=dense_fsa_vec1,
|
||||||
output_beam=params.beam_size,
|
output_beam=params.beam_size,
|
||||||
reduction=params.reduction,
|
reduction=params.reduction,
|
||||||
use_double_scores=params.use_double_scores,
|
use_double_scores=params.use_double_scores,
|
||||||
) + 0.3 * k2.ctc_loss(
|
) + params.interctc_weight * k2.ctc_loss(
|
||||||
decoding_graph=decoding_graph,
|
decoding_graph=decoding_graph,
|
||||||
dense_fsa_vec=dense_fsa_vec2,
|
dense_fsa_vec=dense_fsa_vec2,
|
||||||
output_beam=params.beam_size,
|
output_beam=params.beam_size,
|
||||||
|
|||||||
Reference in New Issue
Block a user