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
d9823dae
Unverified
Commit
d9823dae
authored
Apr 01, 2019
by
Haoyu Zhang
Committed by
GitHub
Apr 01, 2019
Browse files
Add synthetic data monkey patch to OneDeviceStrategy as well (#6505)
parent
cd63cf67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
official/utils/misc/distribution_utils.py
official/utils/misc/distribution_utils.py
+2
-0
No files found.
official/utils/misc/distribution_utils.py
View file @
d9823dae
...
@@ -198,6 +198,7 @@ def _undo_monkey_patch_dataset_method(strategy):
...
@@ -198,6 +198,7 @@ def _undo_monkey_patch_dataset_method(strategy):
def
set_up_synthetic_data
():
def
set_up_synthetic_data
():
_monkey_patch_dataset_method
(
tf
.
distribute
.
OneDeviceStrategy
)
_monkey_patch_dataset_method
(
tf
.
distribute
.
MirroredStrategy
)
_monkey_patch_dataset_method
(
tf
.
distribute
.
MirroredStrategy
)
# TODO(tobyboyd): Remove when contrib.distribute is all in core.
# TODO(tobyboyd): Remove when contrib.distribute is all in core.
if
hasattr
(
tf
,
'contrib'
):
if
hasattr
(
tf
,
'contrib'
):
...
@@ -208,6 +209,7 @@ def set_up_synthetic_data():
...
@@ -208,6 +209,7 @@ def set_up_synthetic_data():
def
undo_set_up_synthetic_data
():
def
undo_set_up_synthetic_data
():
_undo_monkey_patch_dataset_method
(
tf
.
distribute
.
OneDeviceStrategy
)
_undo_monkey_patch_dataset_method
(
tf
.
distribute
.
MirroredStrategy
)
_undo_monkey_patch_dataset_method
(
tf
.
distribute
.
MirroredStrategy
)
# TODO(tobyboyd): Remove when contrib.distribute is all in core.
# TODO(tobyboyd): Remove when contrib.distribute is all in core.
if
hasattr
(
tf
,
'contrib'
):
if
hasattr
(
tf
,
'contrib'
):
...
...
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