未验证 提交 8964fa84 编写于 作者: G Goldie Gadde 提交者: GitHub

Merge pull request #40809 from geetachavan1/cherrypicks_NLYH0

[CherryPick:r2.3] Fix the api docstrings for `on_*_batch_begin` methods in `callbacks.Callback` class.
...@@ -665,8 +665,9 @@ class Callback(object): ...@@ -665,8 +665,9 @@ class Callback(object):
Arguments: Arguments:
batch: Integer, index of batch within the current epoch. batch: Integer, index of batch within the current epoch.
logs: Dict. Has keys `batch` and `size` representing the current batch logs: Dict, contains the return value of `model.train_step`. Typically,
number and the size of the batch. the values of the `Model`'s metrics are returned. Example:
`{'loss': 0.2, 'accuracy': 0.7}`.
""" """
# For backwards compatibility. # For backwards compatibility.
self.on_batch_begin(batch, logs=logs) self.on_batch_begin(batch, logs=logs)
...@@ -697,8 +698,9 @@ class Callback(object): ...@@ -697,8 +698,9 @@ class Callback(object):
Arguments: Arguments:
batch: Integer, index of batch within the current epoch. batch: Integer, index of batch within the current epoch.
logs: Dict. Has keys `batch` and `size` representing the current batch logs: Dict, contains the return value of `model.test_step`. Typically,
number and the size of the batch. the values of the `Model`'s metrics are returned. Example:
`{'loss': 0.2, 'accuracy': 0.7}`.
""" """
@doc_controls.for_subclass_implementers @doc_controls.for_subclass_implementers
...@@ -725,8 +727,9 @@ class Callback(object): ...@@ -725,8 +727,9 @@ class Callback(object):
Arguments: Arguments:
batch: Integer, index of batch within the current epoch. batch: Integer, index of batch within the current epoch.
logs: Dict. Has keys `batch` and `size` representing the current batch logs: Dict, contains the return value of `model.predict_step`,
number and the size of the batch. it typically returns a dict with a key 'outputs' containing
the model's outputs.
""" """
@doc_controls.for_subclass_implementers @doc_controls.for_subclass_implementers
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册