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
748ed3b6
Unverified
Commit
748ed3b6
authored
Apr 10, 2018
by
Yukun Zhu
Committed by
GitHub
Apr 10, 2018
Browse files
Merge pull request #3941 from qlzh727/3885-fix
Fix string to bytes conversion in deeplab data input. #3885
parents
310f70d5
d4aa1a24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
research/deeplab/datasets/build_data.py
research/deeplab/datasets/build_data.py
+2
-1
No files found.
research/deeplab/datasets/build_data.py
View file @
748ed3b6
...
...
@@ -30,6 +30,7 @@ The Example proto contains the following fields:
image/segmentation/class/format: semantic segmentation file format.
"""
import
collections
import
six
import
tensorflow
as
tf
FLAGS
=
tf
.
app
.
flags
.
FLAGS
...
...
@@ -126,7 +127,7 @@ def _bytes_list_feature(values):
A TF-Feature.
"""
def
norm2bytes
(
value
):
return
value
.
encode
()
if
isinstance
(
value
,
str
)
else
value
return
value
.
encode
()
if
isinstance
(
value
,
str
)
and
six
.
PY3
else
value
return
tf
.
train
.
Feature
(
bytes_list
=
tf
.
train
.
BytesList
(
value
=
[
norm2bytes
(
values
)]))
...
...
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