Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
391938b0
Unverified
Commit
391938b0
authored
Jan 18, 2018
by
Asim Shankar
Committed by
GitHub
Jan 18, 2018
Browse files
Merge pull request #3190 from asimshankar/mnist-file
[mnist]: TPU tweaks
parents
9325ea8f
2cfba666
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
official/mnist/dataset.py
official/mnist/dataset.py
+2
-2
official/mnist/mnist_tpu.py
official/mnist/mnist_tpu.py
+2
-1
No files found.
official/mnist/dataset.py
View file @
391938b0
...
...
@@ -59,11 +59,11 @@ def check_labels_file_header(filename):
def
download
(
directory
,
filename
):
"""Download (and unzip) a file from the MNIST dataset, if it doesn't already exist."""
if
not
tf
.
gfile
.
Exists
(
directory
):
tf
.
gfile
.
MakeDirs
(
directory
)
filepath
=
os
.
path
.
join
(
directory
,
filename
)
if
tf
.
gfile
.
Exists
(
filepath
):
return
filepath
if
not
tf
.
gfile
.
Exists
(
directory
):
tf
.
gfile
.
MakeDirs
(
directory
)
# CVDF mirror of http://yann.lecun.com/exdb/mnist/
url
=
'https://storage.googleapis.com/cvdf-datasets/mnist/'
+
filename
+
'.gz'
zipped_filepath
=
filepath
+
'.gz'
...
...
official/mnist/mnist_tpu.py
View file @
391938b0
...
...
@@ -133,6 +133,7 @@ def main(argv):
# Note that the number of examples used during evaluation is
# --eval_steps * --batch_size.
# So if you change --batch_size then change --eval_steps too.
if
FLAGS
.
eval_steps
:
estimator
.
evaluate
(
input_fn
=
eval_input_fn
,
steps
=
FLAGS
.
eval_steps
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment