jadore801120 / attention-is-all-you-need-pytorch

A PyTorch implementation of the Transformer model in "Attention is All You Need".
MIT License
8.78k stars 1.97k forks source link

TypeError: tuple indices must be integers or slices, not tuple when translating #140

Open liperrino opened 4 years ago

liperrino commented 4 years ago

I have this error: TypeError: tuple indices must be integers or slices, not tuple, when try this: python translate.py -data_pkl m30k_deen_shr.pkl -model trained.chkpt -output prediction.txt

Ar-Kareem commented 4 years ago

It would be useful to know which line in the code the error message you got is pointing to. Otherwise it's really hard to diagnose this issue.