Skip to content

Commit 0e13f76

Browse files
committed
fix: setup strategy with set visible devices
1 parent 31312d5 commit 0e13f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow_asr/utils/env_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def setup_strategy(
112112
available_devices = setup_devices(devices)
113113
if len(available_devices) == 1:
114114
return tf.distribute.get_strategy()
115-
return tf.distribute.MirroredStrategy(devices=[d.name for d in available_devices])
115+
return tf.distribute.MultiWorkerMirroredStrategy()
116116

117117

118118
def has_devices(

0 commit comments

Comments
 (0)