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
d7676c1c
Commit
d7676c1c
authored
Oct 24, 2018
by
josh11b
Committed by
Taylor Robie
Oct 24, 2018
Browse files
Rename "num_towers" to "num_replicas" (#5599)
To match new terminology in DistributionStrategy.
parent
780f5265
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
official/utils/misc/distribution_utils_test.py
official/utils/misc/distribution_utils_test.py
+3
-3
No files found.
official/utils/misc/distribution_utils_test.py
View file @
d7676c1c
...
@@ -27,19 +27,19 @@ class GetDistributionStrategyTest(tf.test.TestCase):
...
@@ -27,19 +27,19 @@ class GetDistributionStrategyTest(tf.test.TestCase):
"""Tests for get_distribution_strategy."""
"""Tests for get_distribution_strategy."""
def
test_one_device_strategy_cpu
(
self
):
def
test_one_device_strategy_cpu
(
self
):
ds
=
distribution_utils
.
get_distribution_strategy
(
0
)
ds
=
distribution_utils
.
get_distribution_strategy
(
0
)
self
.
assertEquals
(
ds
.
num_
tower
s
,
1
)
self
.
assertEquals
(
ds
.
num_
replica
s
,
1
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
1
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
1
)
self
.
assertIn
(
'CPU'
,
ds
.
worker_devices
[
0
])
self
.
assertIn
(
'CPU'
,
ds
.
worker_devices
[
0
])
def
test_one_device_strategy_gpu
(
self
):
def
test_one_device_strategy_gpu
(
self
):
ds
=
distribution_utils
.
get_distribution_strategy
(
1
)
ds
=
distribution_utils
.
get_distribution_strategy
(
1
)
self
.
assertEquals
(
ds
.
num_
tower
s
,
1
)
self
.
assertEquals
(
ds
.
num_
replica
s
,
1
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
1
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
1
)
self
.
assertIn
(
'GPU'
,
ds
.
worker_devices
[
0
])
self
.
assertIn
(
'GPU'
,
ds
.
worker_devices
[
0
])
def
test_mirrored_strategy
(
self
):
def
test_mirrored_strategy
(
self
):
ds
=
distribution_utils
.
get_distribution_strategy
(
5
)
ds
=
distribution_utils
.
get_distribution_strategy
(
5
)
self
.
assertEquals
(
ds
.
num_
tower
s
,
5
)
self
.
assertEquals
(
ds
.
num_
replica
s
,
5
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
5
)
self
.
assertEquals
(
len
(
ds
.
worker_devices
),
5
)
for
device
in
ds
.
worker_devices
:
for
device
in
ds
.
worker_devices
:
self
.
assertIn
(
'GPU'
,
device
)
self
.
assertIn
(
'GPU'
,
device
)
...
...
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