mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
0ca6f2b2cf
commit
1bd60745ee
Binary file not shown.
@ -583,18 +583,39 @@ def compute_loss(
|
||||
)
|
||||
|
||||
elif params.condition:
|
||||
dense_fsa_vec1 = k2.DenseFsaVec(
|
||||
dense_fsa_vec = k2.DenseFsaVec(
|
||||
nnet_output[0],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
)
|
||||
|
||||
dense_fsa_vec2 = k2.DenseFsaVec(
|
||||
nnet_output[1][8],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
)
|
||||
|
||||
dense_fsa_vec2 = [
|
||||
k2.DenseFsaVec(
|
||||
nnet_output[1][2],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
),
|
||||
k2.DenseFsaVec(
|
||||
nnet_output[1][5],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
),
|
||||
k2.DenseFsaVec(
|
||||
nnet_output[1][8],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
),
|
||||
k2.DenseFsaVec(
|
||||
nnet_output[1][11],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
),
|
||||
k2.DenseFsaVec(
|
||||
nnet_output[1][14],
|
||||
supervision_segments,
|
||||
allow_truncate=params.subsampling_factor - 1,
|
||||
)
|
||||
]
|
||||
ctc_loss = (1-params.interctc_weight)* k2.ctc_loss(
|
||||
decoding_graph=decoding_graph,
|
||||
dense_fsa_vec=dense_fsa_vec1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user