Skip to content

Commit

Permalink
PR #17956: [keras/engine] Standardise docstring usage of "Default to"
Browse files Browse the repository at this point in the history
Imported from GitHub PR #17956

This is one of many PRs. Discussion + request to split into multiple PRs @ #17748
Copybara import of the project:

--
9ad7371 by Samuel Marks <[email protected]>:

[keras/engine/base_layer.py,keras/engine/base_layer_utils.py,keras/engine/base_layer_v1.py,keras/engine/base_preprocessing_layer.py,keras/engine/data_adapter.py,keras/engine/functional.py,keras/engine/input_layer.py,keras/engine/training.py,keras/engine/training_v1.py] Standardise docstring usage of "Default to"

Merging this change closes #17956

FUTURE_COPYBARA_INTEGRATE_REVIEW=#17956 from SamuelMarks:keras.engine-defaults-to 9ad7371
PiperOrigin-RevId: 536547635
  • Loading branch information
SamuelMarks authored and tensorflower-gardener committed May 31, 2023
1 parent 2722812 commit 5e8a61d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion keras/engine/base_layer_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def __init__(

# Whether the layer will track any layers that are set as attribute on
# itself as sub-layers, the weights from the sub-layers will be included
# in the parent layer's variables() as well. Default to True, which
# in the parent layer's variables() as well. Defaults to `True`, which
# means auto tracking is turned on. Certain subclass might want to turn
# it off, like the Sequential model.
self._auto_track_sub_layers = True
Expand Down
8 changes: 4 additions & 4 deletions keras/engine/base_preprocessing_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ def compile(self, run_eagerly=None, steps_per_execution=None):
"""Configures the layer for `adapt`.
Arguments:
run_eagerly: Bool. Defaults to `False`. If `True`, this `Model`'s
run_eagerly: Bool. If `True`, this `Model`'s
logic will not be wrapped in a `tf.function`. Recommended to leave
this as `None` unless your `Model` cannot be run inside a
`tf.function`.
steps_per_execution: Int. Defaults to 1. The number of batches to run
`tf.function`. Defaults to `False`.
steps_per_execution: Int. The number of batches to run
during each `tf.function` call. Running multiple batches inside a
single `tf.function` call can greatly improve performance on TPUs or
small models with a large Python overhead.
small models with a large Python overhead. Defaults to `1`.
"""
if steps_per_execution is None:
steps_per_execution = 1
Expand Down

0 comments on commit 5e8a61d

Please sign in to comment.