Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transducer: zip object is not subscriptable #52

Open
ghost opened this issue Jun 26, 2019 · 1 comment
Open

Transducer: zip object is not subscriptable #52

ghost opened this issue Jun 26, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 26, 2019

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
Copy link
Author

ghost commented Jun 26, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants