mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-04 06:34:20 +00:00
Update train.py
This commit is contained in:
parent
0ef3da24c1
commit
48c90df9c9
@ -338,7 +338,9 @@ def prepare_input(
|
||||
audio_lens = batch["audio_lens"].to(device)
|
||||
features_lens = batch["features_lens"].to(device)
|
||||
tokens = batch["tokens"]
|
||||
speakers = torch.Tensor([speaker_map[sid] for sid in batch["speakers"]]).int().to(device)
|
||||
speakers = (
|
||||
torch.Tensor([speaker_map[sid] for sid in batch["speakers"]]).int().to(device)
|
||||
)
|
||||
|
||||
tokens = tokenizer.tokens_to_token_ids(tokens)
|
||||
tokens = k2.RaggedTensor(tokens)
|
||||
|
Loading…
x
Reference in New Issue
Block a user