seq2seq-translation-batched.ipynb, the import of
masked_cross_entropy seems not worked.
When I execute to this line, an error occured that
Traceback (most recent call last):
File "seq2seq-translation-batched.py", line 83, in <module>
from masked_cross_entropy import *
ImportError: No module named masked_cross_entropy
import torch seems fine.
And my PyTorch version is
What can I do? I’ve not found any thing about this import issue.
from masked_cross_entropy import * implies you have a file called
masked_cross_entropy in the same directory as your ipynb. Is this true?
I’ve found the mistake.
I forgot to add this file into the same folder of my script.