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
bfa9096b07
commit
f057f0376b
Binary file not shown.
@ -792,6 +792,7 @@ def compute_loss(
|
|||||||
batch: dict,
|
batch: dict,
|
||||||
is_training: bool,
|
is_training: bool,
|
||||||
decode: bool = False,
|
decode: bool = False,
|
||||||
|
pl_texts: dict = None,
|
||||||
) -> Tuple[Tensor, MetricsTracker]:
|
) -> Tuple[Tensor, MetricsTracker]:
|
||||||
"""
|
"""
|
||||||
Compute transducer loss given the model and its inputs.
|
Compute transducer loss given the model and its inputs.
|
||||||
@ -832,11 +833,10 @@ def compute_loss(
|
|||||||
batch_idx_train = params.batch_idx_train
|
batch_idx_train = params.batch_idx_train
|
||||||
warm_step = params.warm_step
|
warm_step = params.warm_step
|
||||||
|
|
||||||
texts = batch["supervisions"]["text"]
|
#texts = batch["supervisions"]["text"]
|
||||||
print(texts)
|
texts = []
|
||||||
exit()
|
for utt_id in
|
||||||
|
|
||||||
#texts = batch["greedy pseudo text"]
|
|
||||||
token_ids = sp.encode(texts, out_type=int)
|
token_ids = sp.encode(texts, out_type=int)
|
||||||
y = k2.RaggedTensor(token_ids).to(device)
|
y = k2.RaggedTensor(token_ids).to(device)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user