speech icon indicating copy to clipboard operation
speech copied to clipboard

Transducer: zip object is not subscriptable

Open ghost opened this issue 5 years ago • 1 comments

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 avatar Jun 26 '19 06:06 ghost

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

ghost avatar Jun 26 '19 06:06 ghost