Skip to content

Commit 1e79b7c

Browse files
committed
[*.py] Rename "Arguments:" to "Args:"
1 parent 4f4e5d0 commit 1e79b7c

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

community/rfcs/techniques/design/20200507-weight-clustering-design.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ All APIs are exposed in the `tfmot.clustering.keras` package — e.g. `tfmot
5151
error. While clustering an entire model, even a single unknown layer would
5252
lead to an error.
5353
54-
Arguments:
54+
Args:
5555
to_cluster: A single keras layer, list of keras layers, or a
5656
`tf.keras.Model` instance.
5757
number_of_clusters: the number of cluster centroids to form when
@@ -109,7 +109,7 @@ All APIs are exposed in the `tfmot.clustering.keras` package — e.g. `tfmot
109109
110110
Only sequential and functional models are supported for now.
111111
112-
Arguments:
112+
Args:
113113
model: A `tf.keras.Model` instance with clustered layers.
114114
115115
Returns:

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

+3-3
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
@@ -266,7 +266,7 @@ def strip_clustering(model):
266266
267267
Only sequential and functional models are supported for now.
268268
269-
Arguments:
269+
Args:
270270
model: A `tf.keras.Model` instance with clustered layers.
271271
272272
Returns:

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

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

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

+1-1
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/internal/compression/keras/compress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def convert_from_model(
335335
phase=CompressionModelPhase.training):
336336
"""Convert a functional `Model` instance.
337337
338-
Arguments:
338+
Args:
339339
model_orig: Instance of `Model`.
340340
config: CompressionConfig
341341
phase: CompressionModelPhase

tensorflow_model_optimization/python/core/keras/compat.py

+1-1
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

+1-1
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/sparsity/keras/prune.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def prune_low_magnitude(to_prune,
122122
upon inspection, the weights of checkpoints are not sparse
123123
(https://github.com/tensorflow/model-optimization/issues/206).
124124
125-
Arguments:
125+
Args:
126126
to_prune: A single keras layer, list of keras layers, or a
127127
`tf.keras.Model` instance.
128128
pruning_schedule: A `PruningSchedule` object that controls pruning rate
@@ -202,7 +202,7 @@ def strip_pruning(model):
202202
203203
Only sequential and functional models are supported for now.
204204
205-
Arguments:
205+
Args:
206206
model: A `tf.keras.Model` instance with pruned layers.
207207
208208
Returns:

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

+1-1
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)