Skip to content

[*.py] Rename "Arguments:" to "Args:" #604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -265,7 +265,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 @@ -25,7 +25,7 @@ class ClusteringSummaries(tf.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 the
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
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 @@ -42,7 +42,7 @@ def _type_model(model):
def _get_clustered_weights(cluster_indices, cluster_centroids):
"""This function is for generating clustered weights using centroids and cluster indices.

Arguments:
Args:
cluster_indices: a variable representing cluster indices
cluster_centroids: a variable representing cluster centroids
Returns:
Expand All @@ -64,7 +64,7 @@ def strip_clustering_cqat(to_strip):
After the CQAT is done, these variables should be removed and the layer
with the clustered weights should be restored.

Arguments:
Args:
to_strip: A `tf.keras.Model` instance with clustered layers or a
`tf.keras.layers.Layer` instance

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,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 @@ -212,7 +212,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