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
77080ad1
Commit
77080ad1
authored
Oct 18, 2016
by
Asim Shankar
Committed by
GitHub
Oct 18, 2016
Browse files
Merge pull request #503 from jonasrauber/patch
added python3 support to read_label_file
parents
1fc268ca
a86f917c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
slim/datasets/dataset_utils.py
slim/datasets/dataset_utils.py
+1
-1
No files found.
slim/datasets/dataset_utils.py
View file @
77080ad1
...
@@ -125,7 +125,7 @@ def read_label_file(dataset_dir, filename=LABELS_FILENAME):
...
@@ -125,7 +125,7 @@ def read_label_file(dataset_dir, filename=LABELS_FILENAME):
"""
"""
labels_filename
=
os
.
path
.
join
(
dataset_dir
,
filename
)
labels_filename
=
os
.
path
.
join
(
dataset_dir
,
filename
)
with
tf
.
gfile
.
Open
(
labels_filename
,
'r'
)
as
f
:
with
tf
.
gfile
.
Open
(
labels_filename
,
'r'
)
as
f
:
lines
=
f
.
read
()
lines
=
f
.
read
()
.
decode
()
lines
=
lines
.
split
(
'
\n
'
)
lines
=
lines
.
split
(
'
\n
'
)
lines
=
filter
(
None
,
lines
)
lines
=
filter
(
None
,
lines
)
...
...
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