mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 10:32:17 +00:00
Fix for style check
This commit is contained in:
parent
fcd60160be
commit
322f954aa4
@ -27,7 +27,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--world-size 4 \
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_0.85_hard_1.py \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_hard_1.py \
|
||||
--full-libri 1 \
|
||||
--max-duration 300
|
||||
|
||||
@ -38,7 +38,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--use-fp16 1 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_0.85_hard_1.py \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_hard_1.py \
|
||||
--full-libri 1 \
|
||||
--max-duration 750
|
||||
"""
|
||||
@ -697,7 +697,9 @@ def compute_loss(
|
||||
)
|
||||
|
||||
# Works with a BPE model
|
||||
decoding_graph = k2.fast_ctc_graph(token_ids, modified=False, device=device, max_repeat=1)
|
||||
decoding_graph = k2.fast_ctc_graph(
|
||||
token_ids, modified=False, device=device, max_repeat=1
|
||||
)
|
||||
dense_fsa_vec = k2.DenseFsaVec(
|
||||
ctc_output,
|
||||
supervision_segments,
|
||||
|
@ -27,7 +27,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--world-size 4 \
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_0.85_hard_2.py \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_hard_2.py \
|
||||
--full-libri 1 \
|
||||
--max-duration 300
|
||||
|
||||
@ -38,7 +38,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--use-fp16 1 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_0.85_hard_2.py \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_hard_2.py \
|
||||
--full-libri 1 \
|
||||
--max-duration 750
|
||||
"""
|
||||
@ -697,7 +697,9 @@ def compute_loss(
|
||||
)
|
||||
|
||||
# Works with a BPE model
|
||||
decoding_graph = k2.fast_ctc_graph(token_ids, modified=False, device=device, max_repeat=2)
|
||||
decoding_graph = k2.fast_ctc_graph(
|
||||
token_ids, modified=False, device=device, max_repeat=2
|
||||
)
|
||||
dense_fsa_vec = k2.DenseFsaVec(
|
||||
ctc_output,
|
||||
supervision_segments,
|
||||
|
@ -27,7 +27,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--world-size 4 \
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_0.03 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_0.03 \
|
||||
--full-libri 1 \
|
||||
--max-duration 300
|
||||
|
||||
@ -38,7 +38,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--use-fp16 1 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_0.03 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_0.03 \
|
||||
--full-libri 1 \
|
||||
--max-duration 750
|
||||
"""
|
||||
@ -705,7 +705,9 @@ def compute_loss(
|
||||
)
|
||||
|
||||
# non-blank arcs self-loop penalty
|
||||
all_self_blanks_idx = decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
all_self_blanks_idx = (
|
||||
decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
)
|
||||
blank_self_loops_idx = decoding_graph.arcs.values()[:, 2] == 0
|
||||
decoding_graph.scores[all_self_blanks_idx] = -0.03
|
||||
decoding_graph.scores[blank_self_loops_idx] = 0.0
|
||||
|
@ -27,7 +27,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--world-size 4 \
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_0.04 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_0.04 \
|
||||
--full-libri 1 \
|
||||
--max-duration 300
|
||||
|
||||
@ -38,7 +38,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--use-fp16 1 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_0.04 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_0.04 \
|
||||
--full-libri 1 \
|
||||
--max-duration 750
|
||||
"""
|
||||
@ -705,7 +705,9 @@ def compute_loss(
|
||||
)
|
||||
|
||||
# non-blank arcs self-loop penalty
|
||||
all_self_blanks_idx = decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
all_self_blanks_idx = (
|
||||
decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
)
|
||||
blank_self_loops_idx = decoding_graph.arcs.values()[:, 2] == 0
|
||||
decoding_graph.scores[all_self_blanks_idx] = -0.04
|
||||
decoding_graph.scores[blank_self_loops_idx] = 0.0
|
||||
|
@ -27,7 +27,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--world-size 4 \
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_0.05 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_0.05 \
|
||||
--full-libri 1 \
|
||||
--max-duration 300
|
||||
|
||||
@ -38,7 +38,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--use-fp16 1 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_0.05 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_0.05 \
|
||||
--full-libri 1 \
|
||||
--max-duration 750
|
||||
"""
|
||||
@ -705,7 +705,9 @@ def compute_loss(
|
||||
)
|
||||
|
||||
# non-blank arcs self-loop penalty
|
||||
all_self_blanks_idx = decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
all_self_blanks_idx = (
|
||||
decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
)
|
||||
blank_self_loops_idx = decoding_graph.arcs.values()[:, 2] == 0
|
||||
decoding_graph.scores[all_self_blanks_idx] = -0.05
|
||||
decoding_graph.scores[blank_self_loops_idx] = 0.0
|
||||
|
@ -27,7 +27,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--world-size 4 \
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_5 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_5 \
|
||||
--full-libri 1 \
|
||||
--max-duration 300
|
||||
|
||||
@ -38,7 +38,7 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
--num-epochs 40 \
|
||||
--start-epoch 21 \
|
||||
--use-fp16 1 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_soft_5 \
|
||||
--exp-dir pruned_transducer_stateless4_ctc_bs_withoutlconv/exp_960_21to40_soft_5 \
|
||||
--full-libri 1 \
|
||||
--max-duration 750
|
||||
"""
|
||||
@ -705,7 +705,9 @@ def compute_loss(
|
||||
)
|
||||
|
||||
# non-blank arcs self-loop penalty
|
||||
all_self_blanks_idx = decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
all_self_blanks_idx = (
|
||||
decoding_graph.arcs.values()[:, 0] == decoding_graph.arcs.values()[:, 1]
|
||||
)
|
||||
blank_self_loops_idx = decoding_graph.arcs.values()[:, 2] == 0
|
||||
decoding_graph.scores[all_self_blanks_idx] = -5.00
|
||||
decoding_graph.scores[blank_self_loops_idx] = 0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user