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
fdf78b86
Unverified
Commit
fdf78b86
authored
Oct 17, 2018
by
josh11b
Committed by
GitHub
Oct 17, 2018
Browse files
Merge pull request #5561 from tensorflow/josh11b-del-is_single_tower
Drop references to `is_single_tower`.
parents
4bd0d89d
b860839f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
official/utils/misc/distribution_utils_test.py
official/utils/misc/distribution_utils_test.py
+0
-3
No files found.
official/utils/misc/distribution_utils_test.py
View file @
fdf78b86
...
...
@@ -27,21 +27,18 @@ class GetDistributionStrategyTest(tf.test.TestCase):
"""Tests for get_distribution_strategy."""
def
test_one_device_strategy_cpu
(
self
):
ds
=
distribution_utils
.
get_distribution_strategy
(
0
)
self
.
assertTrue
(
ds
.
is_single_tower
)
self
.
assertEquals
(
ds
.
num_towers
,
1
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
1
)
self
.
assertIn
(
'CPU'
,
ds
.
worker_devices
[
0
])
def
test_one_device_strategy_gpu
(
self
):
ds
=
distribution_utils
.
get_distribution_strategy
(
1
)
self
.
assertTrue
(
ds
.
is_single_tower
)
self
.
assertEquals
(
ds
.
num_towers
,
1
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
1
)
self
.
assertIn
(
'GPU'
,
ds
.
worker_devices
[
0
])
def
test_mirrored_strategy
(
self
):
ds
=
distribution_utils
.
get_distribution_strategy
(
5
)
self
.
assertFalse
(
ds
.
is_single_tower
)
self
.
assertEquals
(
ds
.
num_towers
,
5
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
5
)
for
device
in
ds
.
worker_devices
:
...
...
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