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
aeb8cfcb
Unverified
Commit
aeb8cfcb
authored
Jan 09, 2018
by
Mark Daoust
Committed by
GitHub
Jan 09, 2018
Browse files
Merge pull request #3122 from knowm/master
[blog_estimators_dataset.py] bug fix for failing demo
parents
f5125ddb
89f5e4e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
samples/outreach/blogs/blog_estimators_dataset.py
samples/outreach/blogs/blog_estimators_dataset.py
+1
-1
No files found.
samples/outreach/blogs/blog_estimators_dataset.py
View file @
aeb8cfcb
...
@@ -65,7 +65,7 @@ feature_names = [
...
@@ -65,7 +65,7 @@ feature_names = [
def
my_input_fn
(
file_path
,
perform_shuffle
=
False
,
repeat_count
=
1
):
def
my_input_fn
(
file_path
,
perform_shuffle
=
False
,
repeat_count
=
1
):
def
decode_csv
(
line
):
def
decode_csv
(
line
):
parsed_line
=
tf
.
decode_csv
(
line
,
[[
0.
],
[
0.
],
[
0.
],
[
0.
],
[
0
]])
parsed_line
=
tf
.
decode_csv
(
line
,
[[
0.
],
[
0.
],
[
0.
],
[
0.
],
[
0
]])
label
=
parsed_line
[
-
1
:
]
# Last element is the label
label
=
parsed_line
[
-
1
]
# Last element is the label
del
parsed_line
[
-
1
]
# Delete last element
del
parsed_line
[
-
1
]
# Delete last element
features
=
parsed_line
# Everything but last elements are the features
features
=
parsed_line
# Everything but last elements are the features
d
=
dict
(
zip
(
feature_names
,
features
)),
label
d
=
dict
(
zip
(
feature_names
,
features
)),
label
...
...
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