OpenNMT / OpenNMT-py

Open Source Neural Machine Translation and (Large) Language Models in PyTorch
https://opennmt.net/
MIT License
6.75k stars 2.25k forks source link

Training problem. #818

Closed arvidzt closed 6 years ago

arvidzt commented 6 years ago

When i update my code version, I got a Error like this. File "/apsara/tubo/TempRoot/Odps/cbu_irecom_20180711105622f92e0528_f838_405f_8e09_3dcfa98df0b2_AlgoTask_0_0/OpenmpiWorker@b05c13173.nt12#0/onmt/trainer.py", line 143, in train for i, batch in enumerate(train_iter): File "/apsara/tubo/TempRoot/Odps/cbu_irecom_20180711105622f92e0528_f838_405f_8e09_3dcfa98df0b2_AlgoTask_0_0/OpenmpiWorker@b05c13173.nt12#0/onmt/inputters/inputter.py", line 432, in iter for batch in self.cur_iter: File "/opt/conda/envs/py2.7/lib/python2.7/site-packages/torchtext/data/iterator.py", line 151, in iter self.train) File "/opt/conda/envs/py2.7/lib/python2.7/site-packages/torchtext/data/batch.py", line 27, in init setattr(self, name, field.process(batch, device=device, train=train)) File "/opt/conda/envs/py2.7/lib/python2.7/site-packages/torchtext/data/field.py", line 188, in process tensor = self.numericalize(padded, device=device, train=train) File "/opt/conda/envs/py2.7/lib/python2.7/site-packages/torchtext/data/field.py", line 308, in numericalize arr = self.postprocessing(arr, None, train) TypeError: make_src() takes exactly 2 arguments (3 given)

rbommasanimozilla commented 6 years ago

do you have the right torchtext version?

alphadl commented 6 years ago

maybe you can try to delete the 2nd arg : None

vince62s commented 6 years ago

closing, reopen if needed.