awni / speech

A PyTorch Implementation of End-to-End Models for Speech-to-Text
Apache License 2.0
750 stars 176 forks source link

Transducer: zip object is not subscriptable #52

Open ghost opened 5 years ago

ghost commented 5 years ago

Whenver I run any model it works fine, however running transducer gives the error in transducer_model.py

Zip object is not subscriptable, line 48

So what I do is try to cast it as list, then I get

batch[1] is out of range

I tried to manually print the contents of "batch", and for some reason they empty themselves after being printed out.

Example: print(*batch) -> [...][...] print(*batch)' -> ` (nothing gets printed)

ghost commented 5 years ago

I solved it by adding batch = list(batch) in 2 places in the first line of the for loop in eval_dev() and in run_epoch() inside train.py