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
cffaa589
Unverified
Commit
cffaa589
authored
Apr 06, 2018
by
Qianli Scott Zhu
Committed by
GitHub
Apr 06, 2018
Browse files
Update data model download location to temp dir. (#3899)
parent
c79ae385
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
official/mnist/dataset.py
official/mnist/dataset.py
+2
-1
No files found.
official/mnist/dataset.py
View file @
cffaa589
...
...
@@ -20,6 +20,7 @@ from __future__ import print_function
import
gzip
import
os
import
shutil
import
tempfile
import
numpy
as
np
from
six.moves
import
urllib
...
...
@@ -67,7 +68,7 @@ def download(directory, filename):
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'
_
,
zipped_filepath
=
tempfile
.
mkstemp
(
suffix
=
'.gz'
)
print
(
'Downloading %s to %s'
%
(
url
,
zipped_filepath
))
urllib
.
request
.
urlretrieve
(
url
,
zipped_filepath
)
with
gzip
.
open
(
zipped_filepath
,
'rb'
)
as
f_in
,
\
...
...
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