Skip to content

Commit 53d2425

Browse files
committed
[*.py] Rename "Arguments:" to "Args:"
1 parent 1eaa343 commit 53d2425

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

tensorflow_model_optimization/python/core/clustering/keras/cluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def cluster_weights(to_cluster,
9898
])
9999
```
100100
101-
Arguments:
101+
Args:
102102
to_cluster: A single keras layer, list of keras layers, or a
103103
`tf.keras.Model` instance.
104104
number_of_clusters: the number of cluster centroids to form when
@@ -195,7 +195,7 @@ def _cluster_weights(to_cluster, number_of_clusters, cluster_centroids_init,
195195
])
196196
```
197197
198-
Arguments:
198+
Args:
199199
to_cluster: A single keras layer, list of keras layers, or a
200200
`tf.keras.Model` instance.
201201
number_of_clusters: the number of cluster centroids to form when
@@ -265,7 +265,7 @@ def strip_clustering(model):
265265
266266
Only sequential and functional models are supported for now.
267267
268-
Arguments:
268+
Args:
269269
model: A `tf.keras.Model` instance with clustered layers.
270270
271271
Returns:

tensorflow_model_optimization/python/core/clustering/keras/clustering_callbacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ClusteringSummaries(tf.keras.callbacks.TensorBoard):
2525
This class is derived from tf.keras.callbacks.TensorBoard and just adds
2626
functionality to write histograms with batch-wise frequency.
2727
28-
Arguments:
28+
Args:
2929
log_dir: The path to the directory where the log files are saved
3030
cluster_update_freq: determines the frequency of updates of the
3131
clustering histograms. Same behaviour as parameter update_freq of the

tensorflow_model_optimization/python/core/clustering/keras/experimental/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def cluster_weights(to_cluster, number_of_clusters, cluster_centroids_init,
7979
])
8080
```
8181
82-
Arguments:
82+
Args:
8383
to_cluster: A single keras layer, list of keras layers, or a
8484
`tf.keras.Model` instance.
8585
number_of_clusters: the number of cluster centroids to form when

tensorflow_model_optimization/python/core/keras/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def assign(ref, value, name=None):
3131
def initialize_variables(testcase):
3232
"""Handle global variable initialization in TF 1.X.
3333
34-
Arguments:
34+
Args:
3535
testcase: instance of tf.test.TestCase
3636
"""
3737
if hasattr(tf, 'global_variables_initializer') and not tf.executing_eagerly():

tensorflow_model_optimization/python/core/keras/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def smart_cond(pred, true_fn=None, false_fn=None, name=None): # pylint: disable
3434
If `pred` is a bool or has a constant value, we return either `true_fn()`
3535
or `false_fn()`, otherwise we use `tf.cond` to dynamically route to both.
3636
37-
Arguments:
37+
Args:
3838
pred: A scalar determining whether to return the result of `true_fn` or
3939
`false_fn`.
4040
true_fn: The callable to be performed if pred is true.

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/cluster_preserve/cluster_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _type_model(model):
4242
def _get_clustered_weights(cluster_indices, cluster_centroids):
4343
"""This function is for generating clustered weights using centroids and cluster indices.
4444
45-
Arguments:
45+
Args:
4646
cluster_indices: a variable representing cluster indices
4747
cluster_centroids: a variable representing cluster centroids
4848
Returns:
@@ -64,7 +64,7 @@ def strip_clustering_cqat(to_strip):
6464
After the CQAT is done, these variables should be removed and the layer
6565
with the clustered weights should be restored.
6666
67-
Arguments:
67+
Args:
6868
to_strip: A `tf.keras.Model` instance with clustered layers or a
6969
`tf.keras.layers.Layer` instance
7070

tensorflow_model_optimization/python/core/sparsity/keras/prune.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def prune_low_magnitude(to_prune,
124124
upon inspection, the weights of checkpoints are not sparse
125125
(https://github.com/tensorflow/model-optimization/issues/206).
126126
127-
Arguments:
127+
Args:
128128
to_prune: A single keras layer, list of keras layers, or a
129129
`tf.keras.Model` instance.
130130
pruning_schedule: A `PruningSchedule` object that controls pruning rate
@@ -212,7 +212,7 @@ def strip_pruning(model):
212212
213213
Only sequential and functional models are supported for now.
214214
215-
Arguments:
215+
Args:
216216
model: A `tf.keras.Model` instance with pruned layers.
217217
218218
Returns:

tensorflow_model_optimization/python/core/sparsity/keras/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def model_type_keys():
100100
def list_to_named_parameters(param_name, options):
101101
"""Convert list of options for parameter to input to @parameterized.named_parameters.
102102
103-
Arguments:
103+
Args:
104104
param_name: name of parameter
105105
options: list of options for parameter
106106

0 commit comments

Comments
 (0)