Closed
Description
here is the snippet:
from __future__ import print_function
from torchtext.datasets import WikiText2
i_train, i_dev, i_test = WikiText2.iters(device='-1', root="data/")
for i in i_train:
print(i)
here's the error:
Traceback (most recent call last):
File "bug.py", line 5, in <module>
for i in i_train:
File "/u/bosctom/.local/lib/python2.7/site-packages/torchtext/data/iterator.py", line 218, in __iter__
self.batch_size - len(text)))
TypeError: can't multiply sequence by non-int of type 'float'
The bug is related to python2's math.ceil() returning a float?
Metadata
Metadata
Assignees
Labels
No labels