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
6fe6a12d04
commit
411e7f73b2
Binary file not shown.
@ -833,11 +833,11 @@ 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"]
|
||||||
texts = []
|
#texts = []
|
||||||
for cut in supervisions['cut']:
|
#for cut in supervisions['cut']:
|
||||||
utt_id = cut.id
|
# utt_id = cut.id
|
||||||
texts.append(pl_texts[utt_id])
|
# texts.append(pl_texts[utt_id])
|
||||||
|
|
||||||
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