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
99400da5
Unverified
Commit
99400da5
authored
Feb 08, 2018
by
Toby Boyd
Committed by
GitHub
Feb 08, 2018
Browse files
Merge pull request #3339 from newcoder/cifar10_estimator_pickle
Update generate_cifar10_tfrecords.py
parents
fd717e38
fd087884
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tutorials/image/cifar10_estimator/generate_cifar10_tfrecords.py
...als/image/cifar10_estimator/generate_cifar10_tfrecords.py
+4
-4
No files found.
tutorials/image/cifar10_estimator/generate_cifar10_tfrecords.py
View file @
99400da5
...
...
@@ -24,10 +24,10 @@ from __future__ import division
from
__future__
import
print_function
import
argparse
import
cPickle
import
os
import
tarfile
from
six.moves
import
cPickle
as
pickle
from
six.moves
import
xrange
# pylint: disable=redefined-builtin
import
tensorflow
as
tf
...
...
@@ -49,7 +49,7 @@ def _int64_feature(value):
def
_bytes_feature
(
value
):
return
tf
.
train
.
Feature
(
bytes_list
=
tf
.
train
.
BytesList
(
value
=
[
str
(
value
)
]))
return
tf
.
train
.
Feature
(
bytes_list
=
tf
.
train
.
BytesList
(
value
=
[
value
]))
def
_get_file_names
():
...
...
@@ -62,8 +62,8 @@ def _get_file_names():
def
read_pickle_from_file
(
filename
):
with
tf
.
gfile
.
Open
(
filename
,
'r'
)
as
f
:
data_dict
=
cP
ickle
.
load
(
f
)
with
tf
.
gfile
.
Open
(
filename
,
'r
b
'
)
as
f
:
data_dict
=
p
ickle
.
load
(
f
)
return
data_dict
...
...
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