From a1e9ca2a18b7de35b5f74fc6748c9f5ab2b52e55 Mon Sep 17 00:00:00 2001 From: Nicolas Papernot Date: Mon, 18 Mar 2019 13:57:47 -0700 Subject: [PATCH] Closes #32 PiperOrigin-RevId: 239054994 --- research/pate_2017/input.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/research/pate_2017/input.py b/research/pate_2017/input.py index d838806..4316b62 100644 --- a/research/pate_2017/input.py +++ b/research/pate_2017/input.py @@ -250,7 +250,7 @@ def extract_mnist_data(filename, num_images, image_size, pixel_depth): np.save(filename, data) return data else: - with tf.gfile.Open(filename+'.npy', mode='r') as file_obj: + with tf.gfile.Open(filename+'.npy', mode='rb') as file_obj: return np.load(file_obj) @@ -266,7 +266,7 @@ def extract_mnist_labels(filename, num_images): np.save(filename, labels) return labels else: - with tf.gfile.Open(filename+'.npy', mode='r') as file_obj: + with tf.gfile.Open(filename+'.npy', mode='rb') as file_obj: return np.load(file_obj)