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
c6a9fd81
Commit
c6a9fd81
authored
Feb 22, 2017
by
Changming Sun
Browse files
Update download_and_convert_mnist.py for 1.0 and python3 compatibility
parent
c4a96bc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
slim/datasets/download_and_convert_mnist.py
slim/datasets/download_and_convert_mnist.py
+2
-2
No files found.
slim/datasets/download_and_convert_mnist.py
View file @
c6a9fd81
...
@@ -125,7 +125,7 @@ def _add_to_tfrecord(data_filename, labels_filename, num_images,
...
@@ -125,7 +125,7 @@ def _add_to_tfrecord(data_filename, labels_filename, num_images,
png_string
=
sess
.
run
(
encoded_png
,
feed_dict
=
{
image
:
images
[
j
]})
png_string
=
sess
.
run
(
encoded_png
,
feed_dict
=
{
image
:
images
[
j
]})
example
=
dataset_utils
.
image_to_tfexample
(
example
=
dataset_utils
.
image_to_tfexample
(
png_string
,
'png'
,
_IMAGE_SIZE
,
_IMAGE_SIZE
,
labels
[
j
])
png_string
,
'png'
.
encode
()
,
_IMAGE_SIZE
,
_IMAGE_SIZE
,
labels
[
j
])
tfrecord_writer
.
write
(
example
.
SerializeToString
())
tfrecord_writer
.
write
(
example
.
SerializeToString
())
...
@@ -165,7 +165,7 @@ def _download_dataset(dataset_dir):
...
@@ -165,7 +165,7 @@ def _download_dataset(dataset_dir):
_progress
)
_progress
)
print
()
print
()
with
tf
.
gfile
.
GFile
(
filepath
)
as
f
:
with
tf
.
gfile
.
GFile
(
filepath
)
as
f
:
size
=
f
.
S
ize
()
size
=
f
.
s
ize
()
print
(
'Successfully downloaded'
,
filename
,
size
,
'bytes.'
)
print
(
'Successfully downloaded'
,
filename
,
size
,
'bytes.'
)
...
...
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