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
{{ message }}
This repository was archived by the owner on Jul 7, 2023. It is now read-only.
There are some holes in the Python 3 compatibility of the Tensor2tensor code. For instance:
In data_generators/generator_utils.py, import urllib needs to be:
import sys
if sys.version_info[0] >= 3:
import urllib.request as urllib
else:
import urllib
In data_generators/image.py, import cPickle needs to be:
try:
import cPickle
except ImportError:
import pickle as cPickle
Finally, data_generators/tokenizer.py needs to be revised as it assumes that a char ordinal is always in the range (0, 256), which is not a safe assumption in Python 3. A better solution uses a set instead of array subscripts based on char ordinals. Would you like me to submit a revised version in a pull request?