Skip to content

Commit

Permalink
Merge pull request tensorflow#3149 from MikalaiDrabovich/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
nealwu authored Jan 13, 2018
2 parents aafe60d + 6487fa7 commit 1887a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions official/mnist/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def read32(bytestream):

def check_image_file_header(filename):
"""Validate that filename corresponds to images for the MNIST dataset."""
with tf.gfile.Open(filename) as f:
with tf.gfile.Open(filename,'rb') as f:
magic = read32(f)
num_images = read32(f)
rows = read32(f)
Expand All @@ -49,7 +49,7 @@ def check_image_file_header(filename):

def check_labels_file_header(filename):
"""Validate that filename corresponds to labels for the MNIST dataset."""
with tf.gfile.Open(filename) as f:
with tf.gfile.Open(filename,'rb') as f:
magic = read32(f)
num_items = read32(f)
if magic != 2049:
Expand Down

0 comments on commit 1887a5f

Please sign in to comment.