From 2f810e1d36e427ea859b09594da246ff55846ef3 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 24 Jun 2020 21:48:39 -0700 Subject: [PATCH] Fix the api docstrings for `on_*_batch_begin` methods in `callbacks.Callback` class. PiperOrigin-RevId: 318203984 Change-Id: I85e2aa5d4c498b67f3e9130fa45a38173f84b35b --- tensorflow/python/keras/callbacks.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tensorflow/python/keras/callbacks.py b/tensorflow/python/keras/callbacks.py index 138a682c739..9e7575a232b 100644 --- a/tensorflow/python/keras/callbacks.py +++ b/tensorflow/python/keras/callbacks.py @@ -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