Skip to content

Commit

Permalink
six.moves works with python2/3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tfboyd authored Feb 8, 2018
1 parent 32b9685 commit fd08788
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
from __future__ import print_function

import argparse
import pickle
import os

import tarfile
from six.moves import cPickle as pickle
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf

Expand Down Expand Up @@ -63,7 +63,7 @@ def _get_file_names():

def read_pickle_from_file(filename):
with tf.gfile.Open(filename, 'rb') as f:
data_dict = pickle.load(f, encoding='latin1')
data_dict = pickle.load(f)
return data_dict


Expand Down

0 comments on commit fd08788

Please sign in to comment.