tf.keras.experimental.SidecarEvaluator
Stay organized with collections
Save and categorize content based on your preferences.
Deprecated. Please use tf.keras.utils.SidecarEvaluator
instead.
Inherits From: SidecarEvaluator
tf.keras.experimental.SidecarEvaluator(
*args, **kwargs
)
Args |
model
|
Model to use for evaluation. The model object used here should
be a tf.keras.Model , and should be the same as the one that is
used in training, where tf.keras.Model s are checkpointed. The
model should have one or more metrics compiled before using
SidecarEvaluator .
|
data
|
The input data for evaluation. SidecarEvaluator supports all
data types that Keras model.evaluate supports as the input data
x , such as a tf.data.Dataset .
|
checkpoint_dir
|
Directory where checkpoint files are saved.
|
steps
|
Number of steps to perform evaluation for, when evaluating a
single checkpoint file. If None , evaluation continues until the
dataset is exhausted. For repeated evaluation dataset, user must
specify steps to avoid infinite evaluation loop.
|
max_evaluations
|
Maximum number of the checkpoint file to be
evaluated, for SidecarEvaluator to know when to stop. The
evaluator will stop after it evaluates a checkpoint filepath ending
with '-'. If using
tf.train.CheckpointManager.save for saving checkpoints, the kth
saved checkpoint has the filepath suffix '-' (k=1 for
the first saved), and if checkpoints are saved every epoch after
training, the filepath saved at the kth epoch would end with
'-. Thus, if training runs for n epochs, and the
evaluator should end after the training finishes, use n for this
parameter. Note that this is not necessarily equal to the number of
total evaluations, since some checkpoints may be skipped if
evaluation is slower than checkpoint creation. If None ,
SidecarEvaluator will evaluate indefinitely, and the user must
terminate evaluator program themselves.
|
callbacks
|
List of keras.callbacks.Callback instances to apply
during evaluation. See
callbacks.
|
Methods
start
View source
start()
Starts the evaluation loop.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tf.keras.experimental.SidecarEvaluator\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/keras-team/keras/tree/v2.13.1/keras/utils/sidecar_evaluator.py#L322-L338) |\n\nDeprecated. Please use [`tf.keras.utils.SidecarEvaluator`](../../../tf/keras/utils/SidecarEvaluator) instead.\n\nInherits From: [`SidecarEvaluator`](../../../tf/keras/utils/SidecarEvaluator) \n\n tf.keras.experimental.SidecarEvaluator(\n *args, **kwargs\n )\n\n| **Caution:** [`tf.keras.experimental.SidecarEvaluator`](../../../tf/keras/experimental/SidecarEvaluator) endpoint is deprecated and will be removed in a future release. Please use [`tf.keras.utils.SidecarEvaluator`](../../../tf/keras/utils/SidecarEvaluator).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `model` | Model to use for evaluation. The model object used here should be a [`tf.keras.Model`](../../../tf/keras/Model), and should be the same as the one that is used in training, where [`tf.keras.Model`](../../../tf/keras/Model)s are checkpointed. The model should have one or more metrics compiled before using `SidecarEvaluator`. |\n| `data` | The input data for evaluation. `SidecarEvaluator` supports all data types that Keras `model.evaluate` supports as the input data `x`, such as a [`tf.data.Dataset`](../../../tf/data/Dataset). |\n| `checkpoint_dir` | Directory where checkpoint files are saved. |\n| `steps` | Number of steps to perform evaluation for, when evaluating a single checkpoint file. If `None`, evaluation continues until the dataset is exhausted. For repeated evaluation dataset, user must specify `steps` to avoid infinite evaluation loop. |\n| `max_evaluations` | Maximum number of the checkpoint file to be evaluated, for `SidecarEvaluator` to know when to stop. The evaluator will stop after it evaluates a checkpoint filepath ending with '-'. If using [`tf.train.CheckpointManager.save`](../../../tf/train/CheckpointManager#save) for saving checkpoints, the kth saved checkpoint has the filepath suffix '-' (k=1 for the first saved), and if checkpoints are saved every epoch after training, the filepath saved at the kth epoch would end with '-. Thus, if training runs for n epochs, and the evaluator should end after the training finishes, use n for this parameter. Note that this is not necessarily equal to the number of total evaluations, since some checkpoints may be skipped if evaluation is slower than checkpoint creation. If `None`, `SidecarEvaluator` will evaluate indefinitely, and the user must terminate evaluator program themselves. |\n| `callbacks` | List of [`keras.callbacks.Callback`](../../../tf/keras/callbacks/Callback) instances to apply during evaluation. See [callbacks](/api_docs/python/tf/keras/callbacks). |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `start`\n\n[View source](https://github.com/keras-team/keras/tree/v2.13.1/keras/utils/sidecar_evaluator.py#L206-L319) \n\n start()\n\nStarts the evaluation loop."]]