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
d0600d40
Commit
d0600d40
authored
Oct 12, 2019
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 274347990
parent
dccc21dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
official/r1/wide_deep/census_dataset.py
official/r1/wide_deep/census_dataset.py
+2
-1
No files found.
official/r1/wide_deep/census_dataset.py
View file @
d0600d40
...
@@ -25,6 +25,7 @@ import sys
...
@@ -25,6 +25,7 @@ import sys
from
absl
import
app
as
absl_app
from
absl
import
app
as
absl_app
from
absl
import
flags
from
absl
import
flags
from
six.moves
import
urllib
from
six.moves
import
urllib
from
six.moves
import
zip
import
tensorflow
as
tf
import
tensorflow
as
tf
# pylint: enable=wrong-import-order
# pylint: enable=wrong-import-order
...
@@ -166,7 +167,7 @@ def input_fn(data_file, num_epochs, shuffle, batch_size):
...
@@ -166,7 +167,7 @@ def input_fn(data_file, num_epochs, shuffle, batch_size):
def
parse_csv
(
value
):
def
parse_csv
(
value
):
tf
.
logging
.
info
(
'Parsing {}'
.
format
(
data_file
))
tf
.
logging
.
info
(
'Parsing {}'
.
format
(
data_file
))
columns
=
tf
.
decode_csv
(
value
,
record_defaults
=
_CSV_COLUMN_DEFAULTS
)
columns
=
tf
.
decode_csv
(
value
,
record_defaults
=
_CSV_COLUMN_DEFAULTS
)
features
=
dict
(
zip
(
_CSV_COLUMNS
,
columns
))
features
=
dict
(
list
(
zip
(
_CSV_COLUMNS
,
columns
))
)
labels
=
features
.
pop
(
'income_bracket'
)
labels
=
features
.
pop
(
'income_bracket'
)
classes
=
tf
.
equal
(
labels
,
'>50K'
)
# binary classification
classes
=
tf
.
equal
(
labels
,
'>50K'
)
# binary classification
return
features
,
classes
return
features
,
classes
...
...
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