Skip to content

Commit 0f2f5b9

Browse files
taehoonleegunan
authored andcommitted
Fix PEP8 (tensorflow#15378)
1 parent 943201b commit 0f2f5b9

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tensorflow/contrib/opt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
'VariableClippingOptimizer',
4848
'MultitaskOptimizerWrapper',
4949
'clip_gradients_by_global_norm',
50-
'ElasticAverageOptimizer',
50+
'ElasticAverageOptimizer',
5151
'ElasticAverageCustomGetter'
5252
]
5353

tensorflow/contrib/opt/python/training/elastic_average_optimizer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ def __call__(self, getter, name, trainable, collections, *args, **kwargs):
7979
if trainable:
8080
with ops.device(self._worker_device):
8181
local_var = getter(name, trainable=True,
82-
collections=[ops.GraphKeys.LOCAL_VARIABLES],
82+
collections=[ops.GraphKeys.LOCAL_VARIABLES],
8383
*args, **kwargs)
84-
84+
8585
global_center_variable = variable_scope.variable(
8686
name='%s/%s' %
8787
(GLOBAL_VARIABLE_NAME,
@@ -96,7 +96,7 @@ def __call__(self, getter, name, trainable, collections, *args, **kwargs):
9696
initial_value=local_var.initialized_value(),
9797
trainable=False,
9898
collections=[ops.GraphKeys.LOCAL_VARIABLES])
99-
99+
100100
self._local_map[local_var] = local_center_variable
101101
self._global_map[local_var] = global_center_variable
102102
return local_var
@@ -173,7 +173,7 @@ def compute_gradients(self, loss, var_list=None,
173173
colocate_gradients_with_ops=False,
174174
grad_loss=None):
175175
"""Compute gradients of `loss` for the variables in `var_list`.
176-
176+
177177
Add rho*elastic_difference to loss to control the exploration
178178
This is the first part of `minimize()`. It returns a list
179179
of (gradient, variable) pairs where "gradient" is the gradient
@@ -204,7 +204,7 @@ def compute_gradients(self, loss, var_list=None,
204204
"""
205205
if not var_list:
206206
var_list = variables.trainable_variables()
207-
207+
208208
elastic_difference = [math_ops.subtract(v, lv) for v, lv in zip(
209209
variables.trainable_variables(),
210210
[self._local_map[var] for var in var_list])]

tensorflow/contrib/tpu/profiler/pip_package/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
'Topic :: Scientific/Engineering :: Mathematics',
7171
'Topic :: Scientific/Engineering :: Artificial Intelligence',
7272
'Topic :: Software Development',
73-
'Topic :: Software Development :: Libraries',
73+
'Topic :: Software Development :: Libraries',
7474
'Topic :: Software Development :: Libraries :: Python Modules',
7575
],
7676
license='Apache 2.0',

tensorflow/examples/how_tos/reading_data/fully_connected_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def decode(serialized_example):
6262

6363
# Convert label from a scalar uint8 tensor to an int32 scalar.
6464
label = tf.cast(features['label'], tf.int32)
65-
65+
6666
return image, label
6767

6868
def augment(image, label):
@@ -172,7 +172,7 @@ def run_training():
172172
step += 1
173173
except tf.errors.OutOfRangeError:
174174
print('Done training for %d epochs, %d steps.' % (FLAGS.num_epochs, step))
175-
175+
176176
def main(_):
177177
run_training()
178178

0 commit comments

Comments
 (0)