You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading model parameters.
dTraceback (most recent call last):
File "translate.py", line 127, in <module>
main()
File "translate.py", line 66, in main
for batch in test_data:
File "/root/anaconda2/lib/python2.7/site-packages/torchtext/data/iterator.py", line 178, in __iter__
self.train)
File "/root/anaconda2/lib/python2.7/site-packages/torchtext/data/batch.py", line 22, in __init__
setattr(self, name, field.process(batch, device=device, train=train))
File "/root/anaconda2/lib/python2.7/site-packages/torchtext/data/field.py", line 184, in process
tensor = self.numericalize(padded, device=device, train=train)
File "/root/anaconda2/lib/python2.7/site-packages/torchtext/data/field.py", line 294, in numericalize
arr = [numericalization_func(x) for x in arr]
File "/root/anaconda2/lib/python2.7/site-packages/torch/tensor.py", line 389, in __float__
raise TypeError("only 1-element tensors can be converted "
TypeError: only 1-element tensors can be converted to Python scalars
Exception TypeError: "'NoneType' object is not callable" in <bound method Program.__del__ of <pynvrtc.compiler.Program object at 0x7f18ef35ce90>> ignored
I don't know what's wrong with it.
The text was updated successfully, but these errors were encountered:
Well, this is a known bug in torchtext 0.2.0, the maintainer has a fix for it: pytorch/text#159
But probably it still not on pip repository for you to update, you can manually patch it or downgrade your torchtext version to 0.1.0(by uninstalling current one, and install the 0.1.0 version.
I have trained a SRU network like this
It worked fine.
However when I tried to do translation like this:
Here came the error:
I don't know what's wrong with it.
The text was updated successfully, but these errors were encountered: