Hi, I’m woking with the tutorial of pytorch seq2seq and after go through the training progress then use the model to translate a random french sentence. It gives me error that word “Fruit” in sentence can not be translated. I understand that because word2index function can not convert “Fruit” to index. Are there any solution for this ? Thanks

image.png767×372 19.5 KB

Reference: https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html#sphx-glr-intermediate-seq2seq-translation-tutorial-py 2