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
6d447202
Commit
6d447202
authored
Nov 07, 2017
by
Neal Wu
Browse files
Shuffle an exact epoch of 32561 examples in wide_deep.py rather than 100k
parent
21b48a85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
official/wide_deep/wide_deep.py
official/wide_deep/wide_deep.py
+5
-2
No files found.
official/wide_deep/wide_deep.py
View file @
6d447202
...
...
@@ -61,7 +61,10 @@ parser.add_argument(
'--test_data'
,
type
=
str
,
default
=
'/tmp/census_data/adult.test'
,
help
=
'Path to the test data.'
)
_SHUFFLE_BUFFER
=
100000
_NUM_EXAMPLES
=
{
'train'
:
32561
,
'validation'
:
16281
,
}
def
build_model_columns
():
...
...
@@ -181,7 +184,7 @@ def input_fn(data_file, num_epochs, shuffle, batch_size):
dataset
=
tf
.
data
.
TextLineDataset
(
data_file
)
if
shuffle
:
dataset
=
dataset
.
shuffle
(
buffer_size
=
_
SHUFFLE_BUFFER
)
dataset
=
dataset
.
shuffle
(
buffer_size
=
_
NUM_EXAMPLES
[
'train'
]
)
dataset
=
dataset
.
map
(
parse_csv
,
num_parallel_calls
=
5
)
...
...
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