Commit 122bb012 authored by Toby Boyd's avatar Toby Boyd
Browse files

fix lint errors.

parent d945e99f
......@@ -21,8 +21,9 @@ from __future__ import print_function
import tensorflow as tf
def get_distribution_strategy(
num_gpus, all_reduce_alg=None, turn_off_distribution_strategy=False):
def get_distribution_strategy(num_gpus,
all_reduce_alg=None,
turn_off_distribution_strategy=False):
"""Return a DistributionStrategy for running the model.
Args:
......@@ -52,8 +53,9 @@ def get_distribution_strategy(
else:
return tf.contrib.distribute.OneDeviceStrategy("device:GPU:0")
elif turn_off_distribution_strategy:
raise ValueError("When %d GPUs are specified, turn_off_distribution_strategy"
" flag cannot be set to True.".format(num_gpus))
raise ValueError("When {} GPUs are specified, "
"turn_off_distribution_strategy flag cannot be set to"
"True.".format(num_gpus))
else: # num_gpus > 1 and not turn_off_distribution_strategy
if all_reduce_alg:
return tf.contrib.distribute.MirroredStrategy(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment