Skip to content

Commit

Permalink
[*.py] Rename "Arguments:" to "Args:"
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelMarks committed Jan 28, 2021
1 parent 4f4e5d0 commit 1e79b7c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ All APIs are exposed in the `tfmot.clustering.keras` package — e.g. `tfmot
error. While clustering an entire model, even a single unknown layer would
lead to an error.
Arguments:
Args:
to_cluster: A single keras layer, list of keras layers, or a
`tf.keras.Model` instance.
number_of_clusters: the number of cluster centroids to form when
Expand Down Expand Up @@ -109,7 +109,7 @@ All APIs are exposed in the `tfmot.clustering.keras` package — e.g. `tfmot
Only sequential and functional models are supported for now.
Arguments:
Args:
model: A `tf.keras.Model` instance with clustered layers.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def cluster_weights(to_cluster,
])
```
Arguments:
Args:
to_cluster: A single keras layer, list of keras layers, or a
`tf.keras.Model` instance.
number_of_clusters: the number of cluster centroids to form when
Expand Down Expand Up @@ -195,7 +195,7 @@ def _cluster_weights(to_cluster, number_of_clusters, cluster_centroids_init,
])
```
Arguments:
Args:
to_cluster: A single keras layer, list of keras layers, or a
`tf.keras.Model` instance.
number_of_clusters: the number of cluster centroids to form when
Expand Down Expand Up @@ -266,7 +266,7 @@ def strip_clustering(model):
Only sequential and functional models are supported for now.
Arguments:
Args:
model: A `tf.keras.Model` instance with clustered layers.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ClusteringSummaries(keras.callbacks.TensorBoard):
This class is derived from tf.keras.callbacks.TensorBoard and just adds
functionality to write histograms with batch-wise frequency.
Arguments:
Args:
log_dir: The path to the directory where the log files are saved
cluster_update_freq: determines the frequency of updates of the
clustering histograms. Same behaviour as parameter update_freq of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def cluster_weights(to_cluster, number_of_clusters, cluster_centroids_init,
])
```
Arguments:
Args:
to_cluster: A single keras layer, list of keras layers, or a
`tf.keras.Model` instance.
number_of_clusters: the number of cluster centroids to form when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def convert_from_model(
phase=CompressionModelPhase.training):
"""Convert a functional `Model` instance.
Arguments:
Args:
model_orig: Instance of `Model`.
config: CompressionConfig
phase: CompressionModelPhase
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_model_optimization/python/core/keras/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def assign(ref, value, name=None):
def initialize_variables(testcase):
"""Handle global variable initialization in TF 1.X.
Arguments:
Args:
testcase: instance of tf.test.TestCase
"""
if hasattr(tf, 'global_variables_initializer') and not tf.executing_eagerly():
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_model_optimization/python/core/keras/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def smart_cond(pred, true_fn=None, false_fn=None, name=None): # pylint: disable
If `pred` is a bool or has a constant value, we return either `true_fn()`
or `false_fn()`, otherwise we use `tf.cond` to dynamically route to both.
Arguments:
Args:
pred: A scalar determining whether to return the result of `true_fn` or
`false_fn`.
true_fn: The callable to be performed if pred is true.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def prune_low_magnitude(to_prune,
upon inspection, the weights of checkpoints are not sparse
(https://github.com/tensorflow/model-optimization/issues/206).
Arguments:
Args:
to_prune: A single keras layer, list of keras layers, or a
`tf.keras.Model` instance.
pruning_schedule: A `PruningSchedule` object that controls pruning rate
Expand Down Expand Up @@ -202,7 +202,7 @@ def strip_pruning(model):
Only sequential and functional models are supported for now.
Arguments:
Args:
model: A `tf.keras.Model` instance with pruned layers.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def model_type_keys():
def list_to_named_parameters(param_name, options):
"""Convert list of options for parameter to input to @parameterized.named_parameters.
Arguments:
Args:
param_name: name of parameter
options: list of options for parameter
Expand Down

0 comments on commit 1e79b7c

Please sign in to comment.