From 63e2c16dc69b4b9e41be4ed1579046a12855edb8 Mon Sep 17 00:00:00 2001 From: dohe0342 Date: Sat, 10 Dec 2022 12:55:39 +0900 Subject: [PATCH] from local --- egs/librispeech/ASR/.run_v2.sh.swp | Bin 12288 -> 12288 bytes .../.train.py.swp | Bin 65536 -> 65536 bytes icefall/.utils.py.swp | Bin 65536 -> 65536 bytes icefall/utils.py | 3 ++- 4 files changed, 2 insertions(+), 1 deletion(-) diff --git a/egs/librispeech/ASR/.run_v2.sh.swp b/egs/librispeech/ASR/.run_v2.sh.swp index 79249b15a6bf9f8007b883502dff1add02109789..33fff072bef125e74281b90c90af8d0ad0a70ef8 100644 GIT binary patch delta 30 kcmZojXh;xEG6?hZRj|}EU;qLE1_no_DangAioVtd0CjT**8l(j delta 30 kcmZojXh;xEG6?hZRj|}EU;qLE1_lNMPKU!0CEHeSO5S3 diff --git a/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.train.py.swp b/egs/librispeech/ASR/pruned_transducer_stateless_d2v_v2/.train.py.swp index 72e1a41b150c0dc9eb06aa4745914c1fde77fd59..b66bcc0a90483c351f049ce574c0ab88e3c14de8 100644 GIT binary patch delta 33 ncmZo@U}U}5f#D+% z-vr{7KpYChJV1OKsQec5=Dt85rpf1aiAk5_7bR!tdFGXbq~;ap7ir{`=EkQLCFZ6U ZYi^bav11fKS1>s$REJS>b6aTDDgY_EDG>kw delta 106 zcmZo@U}}J7$a7Hx;Rt5%pAm#&NCLn$V tl->ozX+SIs#31E0ESviReV8UY`dM)(K*4725Ie@nk)b-9+d`{W0RSu(6-595 diff --git a/icefall/utils.py b/icefall/utils.py index 7eb780a74..cf492c269 100644 --- a/icefall/utils.py +++ b/icefall/utils.py @@ -192,7 +192,7 @@ def encode_supervisions( each other. """ try: start_frame = supervisions["start_frame"] - except: start_frame = [0 for i in range(len(supervisions["cut"]))] + except: start_frame = torch.IntTensor([0 for i in range(len(supervisions["cut"]))]) try: num_frames = supervisions["num_frames"] except: @@ -200,6 +200,7 @@ def encode_supervisions( for supervision in supervisions['cut']: try: num_frames.append(supervision.tracks[0].cut.recording.num_samples) except: num_frames.append(supervision.recording.num_samples) + num_frames = torch.IntTensor(num_frames) supervision_segments = torch.stack( (