Skip to content

Commit 8ed1c47

Browse files
SamuelMarkstensorflower-gardener
authored andcommitted
PR #17956: [keras/engine] Standardise docstring usage of "Default to"
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: 530510437
1 parent 000b9eb commit 8ed1c47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

keras/engine/base_layer_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def __init__(
237237

238238
# Whether the layer will track any layers that are set as attribute on
239239
# itself as sub-layers, the weights from the sub-layers will be included
240-
# in the parent layer's variables() as well. Default to True, which
240+
# in the parent layer's variables() as well. Defaults to `True`, which
241241
# means auto tracking is turned on. Certain subclass might want to turn
242242
# it off, like the Sequential model.
243243
self._auto_track_sub_layers = True

keras/engine/base_preprocessing_layer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ def compile(self, run_eagerly=None, steps_per_execution=None):
140140
"""Configures the layer for `adapt`.
141141
142142
Arguments:
143-
run_eagerly: Bool. Defaults to `False`. If `True`, this `Model`'s
143+
run_eagerly: Bool. If `True`, this `Model`'s
144144
logic will not be wrapped in a `tf.function`. Recommended to leave
145145
this as `None` unless your `Model` cannot be run inside a
146-
`tf.function`.
147-
steps_per_execution: Int. Defaults to 1. The number of batches to run
146+
`tf.function`. Defaults to `False`.
147+
steps_per_execution: Int. The number of batches to run
148148
during each `tf.function` call. Running multiple batches inside a
149149
single `tf.function` call can greatly improve performance on TPUs or
150-
small models with a large Python overhead.
150+
small models with a large Python overhead. Defaults to `1`.
151151
"""
152152
if steps_per_execution is None:
153153
steps_per_execution = 1

0 commit comments

Comments
 (0)