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
34495bde
Commit
34495bde
authored
Jul 28, 2017
by
Marianne Linhares Monteiro
Committed by
GitHub
Jul 28, 2017
Browse files
Small fixes
parent
748eceae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tutorials/image/cifar10_estimator/generate_cifar10_tfrecords.py
...als/image/cifar10_estimator/generate_cifar10_tfrecords.py
+3
-2
No files found.
tutorials/image/cifar10_estimator/generate_cifar10_tfrecords.py
View file @
34495bde
...
@@ -30,6 +30,7 @@ FLAGS = tf.flags.FLAGS
...
@@ -30,6 +30,7 @@ FLAGS = tf.flags.FLAGS
tf
.
flags
.
DEFINE_string
(
'input_dir'
,
''
,
tf
.
flags
.
DEFINE_string
(
'input_dir'
,
''
,
'Directory where CIFAR10 data is located.'
)
'Directory where CIFAR10 data is located.'
)
tf
.
flags
.
DEFINE_string
(
'output_dir'
,
''
,
tf
.
flags
.
DEFINE_string
(
'output_dir'
,
''
,
'Directory where TFRecords will be saved.'
'Directory where TFRecords will be saved.'
'The TFRecords will have the same name as'
'The TFRecords will have the same name as'
...
@@ -56,6 +57,7 @@ def read_pickle_from_file(filename):
...
@@ -56,6 +57,7 @@ def read_pickle_from_file(filename):
data_dict
=
cPickle
.
load
(
f
)
data_dict
=
cPickle
.
load
(
f
)
return
data_dict
return
data_dict
def
main
(
argv
):
def
main
(
argv
):
del
argv
# Unused.
del
argv
# Unused.
...
@@ -80,9 +82,8 @@ def main(argv):
...
@@ -80,9 +82,8 @@ def main(argv):
'label'
:
_int64_feature
(
labels
[
i
])
'label'
:
_int64_feature
(
labels
[
i
])
}))
}))
record_writer
.
write
(
example
.
SerializeToString
())
record_writer
.
write
(
example
.
SerializeToString
())
record_writer
.
close
()
record_writer
.
close
()
print
(
'Done!'
)
print
(
'Done!'
)
...
...
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