提交 0b3d833e 编写于 作者: A A. Unique TensorFlower 提交者: TensorFlower Gardener

Clarify behavior of fit/predict/evaluate when inputs are Datasets and step args are None.

PiperOrigin-RevId: 235238247
上级 56915ed7
......@@ -637,11 +637,15 @@ class Model(Network):
next epoch. When training with input tensors such as
TensorFlow data tensors, the default `None` is equal to
the number of samples in your dataset divided by
the batch size, or 1 if that cannot be determined.
the batch size, or 1 if that cannot be determined. If x is a
`tf.data` dataset or a dataset iterator, and 'steps_per_epoch'
is None, the epoch will run until the input dataset is exhausted.
validation_steps: Only relevant if `validation_data` is provided and
is a dataset or dataset iterator. Total number of steps (batches of
samples) to draw before stopping when performing validation
at the end of every epoch.
at the end of every epoch. If validation_data is a `tf.data` dataset
or a dataset iterator, and 'validation_steps' is None, validation
will run until the `validation_data` dataset is exhausted.
validation_freq: Only relevant if validation data is provided. Integer
or `collections.Container` instance (e.g. list, tuple, etc.). If an
integer, specifies how many training epochs to run before a new
......@@ -926,6 +930,8 @@ class Model(Network):
Total number of steps (batches of samples)
before declaring the evaluation round finished.
Ignored with the default value of `None`.
If x is a `tf.data` dataset or a dataset iterator, and `steps` is
None, 'evaluate' will run until the dataset is exhausted.
callbacks: List of `keras.callbacks.Callback` instances.
List of callbacks to apply during evaluation.
See [callbacks](/api_docs/python/tf/keras/callbacks).
......@@ -1074,7 +1080,9 @@ class Model(Network):
verbose: Verbosity mode, 0 or 1.
steps: Total number of steps (batches of samples)
before declaring the prediction round finished.
Ignored with the default value of `None`.
Ignored with the default value of `None`. If x is a `tf.data`
dataset or a dataset iterator, and `steps` is None, `predict` will
run until the input dataset is exhausted.
callbacks: List of `keras.callbacks.Callback` instances.
List of callbacks to apply during prediction.
See [callbacks](/api_docs/python/tf/keras/callbacks).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册