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
85956b16
Commit
85956b16
authored
Aug 27, 2019
by
Jing Li
Committed by
A. Unique TensorFlower
Aug 27, 2019
Browse files
Update interleave hyperparameters
PiperOrigin-RevId: 265780130
parent
0fa5ff23
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
official/bert/input_pipeline.py
official/bert/input_pipeline.py
+5
-1
No files found.
official/bert/input_pipeline.py
View file @
85956b16
...
...
@@ -94,8 +94,12 @@ def create_pretrain_dataset(file_paths,
dataset
=
dataset
.
shuffle
(
len
(
file_paths
))
# In parallel, create tf record dataset for each train files.
# cycle_length = 8 means that up to 8 files will be read and deserialized in
# parallel. You may want to increase this number if you have a large number of
# CPU cores.
dataset
=
dataset
.
interleave
(
tf
.
data
.
TFRecordDataset
,
cycle_length
=
tf
.
data
.
experimental
.
AUTOTUNE
)
tf
.
data
.
TFRecordDataset
,
cycle_length
=
8
,
num_parallel_calls
=
tf
.
data
.
experimental
.
AUTOTUNE
)
decode_fn
=
lambda
record
:
decode_record
(
record
,
name_to_features
)
dataset
=
dataset
.
map
(
...
...
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