This came when running the German->English model:
iwslt-brnn2.s131_acc_62.71_ppl_7.74_e20.pt
/content/OpenNMT-py/onmt/translate/translation.py:48: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number
tokens[i] = src_raw[max_index[0]]