Skip to content

Commit cf03bda

Browse files
committed
minor bugfix
1 parent 8db3d30 commit cf03bda

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

asr/models/las/network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def _train_forward(self, x, x_seq_lens, y, y_seq_lens):
374374
eos_t = y.new_full((self.spell.num_eos, ), self.eos)
375375
ys = [torch.cat((yb, eos_t)) for yb in torch.split(y, y_seq_lens.tolist())]
376376
ys = nn.utils.rnn.pad_sequence(ys, batch_first=True, padding_value=self.blk)
377-
ys, ys_seq_lens = ys[bi], y_seq_lens[bi] + 1
377+
ys, ys_seq_lens = ys[bi], y_seq_lens[bi] + self.spell.num_eos
378378

379379
if self._is_teacher_force():
380380
# speller with teach force rate including noise

requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
numpy
22
scipy
3-
torch_nightly --find-links https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
3+
#torch_nightly --find-links https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
4+
torch -f https://download.pytorch.org/whl/cu100/torch-1.0.0-cp37-cp37m-linux_x86_64.whl
45
git+https://github.com/pytorch/audio
5-
git+https://github.com/pytorch/vision
6+
#git+https://github.com/pytorch/vision
7+
torchvision
68
git+https://github.com/pytorch/text
79
git+https://github.com/pytorch/tnt
810
git+https://github.com/NVIDIA/apex

0 commit comments

Comments
 (0)