Merge pull request #40809 from geetachavan1/cherrypicks_NLYH0

[CherryPick:r2.3] Fix the api docstrings for `on_*_batch_begin` methods in `callbacks.Callback` class.
This commit is contained in:
Goldie Gadde 2020-06-25 21:40:03 -07:00 committed by GitHub
commit 8964fa8419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -665,8 +665,9 @@ class Callback(object):
Arguments:
batch: Integer, index of batch within the current epoch.
logs: Dict. Has keys `batch` and `size` representing the current batch
number and the size of the batch.
logs: Dict, contains the return value of `model.train_step`. Typically,
the values of the `Model`'s metrics are returned. Example:
`{'loss': 0.2, 'accuracy': 0.7}`.
"""
# For backwards compatibility.
self.on_batch_begin(batch, logs=logs)
@ -697,8 +698,9 @@ class Callback(object):
Arguments:
batch: Integer, index of batch within the current epoch.
logs: Dict. Has keys `batch` and `size` representing the current batch
number and the size of the batch.
logs: Dict, contains the return value of `model.test_step`. Typically,
the values of the `Model`'s metrics are returned. Example:
`{'loss': 0.2, 'accuracy': 0.7}`.
"""
@doc_controls.for_subclass_implementers
@ -725,8 +727,9 @@ class Callback(object):
Arguments:
batch: Integer, index of batch within the current epoch.
logs: Dict. Has keys `batch` and `size` representing the current batch
number and the size of the batch.
logs: Dict, contains the return value of `model.predict_step`,
it typically returns a dict with a key 'outputs' containing
the model's outputs.
"""
@doc_controls.for_subclass_implementers