Unverified Commit fd087884 authored by Toby Boyd's avatar Toby Boyd Committed by GitHub
Browse files

six.moves works with python2/3

The change you added did not work with python2, it does not have encoding in .log.  This fixes it. feel free to test on Python3.  I tested python2 and I am really sue this works fine for python3.  Good catch.  sorry for not having it fixed earlier.
parent 32b96851
...@@ -24,10 +24,10 @@ from __future__ import division ...@@ -24,10 +24,10 @@ from __future__ import division
from __future__ import print_function from __future__ import print_function
import argparse import argparse
import pickle
import os import os
import tarfile import tarfile
from six.moves import cPickle as pickle
from six.moves import xrange # pylint: disable=redefined-builtin from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf import tensorflow as tf
...@@ -63,7 +63,7 @@ def _get_file_names(): ...@@ -63,7 +63,7 @@ def _get_file_names():
def read_pickle_from_file(filename): def read_pickle_from_file(filename):
with tf.gfile.Open(filename, 'rb') as f: with tf.gfile.Open(filename, 'rb') as f:
data_dict = pickle.load(f, encoding='latin1') data_dict = pickle.load(f)
return data_dict return data_dict
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment