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
bd0d5692
Commit
bd0d5692
authored
Oct 21, 2019
by
Frank Chen
Committed by
A. Unique TensorFlower
Oct 21, 2019
Browse files
Consolidate DistributeOptions.auto_shard into DistributeOptions.auto_shard_policy.
PiperOrigin-RevId: 275930249
parent
aa3a6f23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
official/nlp/bert/input_pipeline.py
official/nlp/bert/input_pipeline.py
+2
-1
official/nlp/xlnet/data_utils.py
official/nlp/xlnet/data_utils.py
+2
-1
No files found.
official/nlp/bert/input_pipeline.py
View file @
bd0d5692
...
...
@@ -51,7 +51,8 @@ def file_based_input_fn_builder(input_file, name_to_features):
# same input file is sent to all workers.
if
isinstance
(
input_file
,
str
)
or
len
(
input_file
)
==
1
:
options
=
tf
.
data
.
Options
()
options
.
experimental_distribute
.
auto_shard
=
False
options
.
experimental_distribute
.
auto_shard_policy
=
(
tf
.
data
.
experimental
.
AutoShardPolicy
.
OFF
)
d
=
d
.
with_options
(
options
)
return
d
...
...
official/nlp/xlnet/data_utils.py
View file @
bd0d5692
...
...
@@ -119,7 +119,8 @@ def file_based_input_fn_builder(input_file, name_to_features, batch_size,
# same input file is sent to all workers.
if
isinstance
(
input_file
,
str
)
or
len
(
input_file
)
==
1
:
options
=
tf
.
data
.
Options
()
options
.
experimental_distribute
.
auto_shard
=
False
options
.
experimental_distribute
.
auto_shard_policy
=
(
tf
.
data
.
experimental
.
AutoShardPolicy
.
OFF
)
d
=
d
.
with_options
(
options
)
d
=
d
.
prefetch
(
tf
.
data
.
experimental
.
AUTOTUNE
)
...
...
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