evaluate.keras.src.models.model.Model {keras3} | R Documentation |
Evaluate a Keras Model
Description
This functions returns the loss value and metrics values for the model in
test mode.
Computation is done in batches (see the batch_size
arg.)
Usage
## S3 method for class 'keras.src.models.model.Model'
evaluate(
object,
x = NULL,
y = NULL,
...,
batch_size = NULL,
verbose = getOption("keras.verbose", default = "auto"),
sample_weight = NULL,
steps = NULL,
callbacks = NULL
)
Arguments
object |
Keras model object |
x |
Input data. It could be:
|
y |
Target data. Like the input data |
... |
For forward/backward compatability. |
batch_size |
Integer or |
verbose |
|
sample_weight |
Optional array of weights for the test samples,
used for weighting the loss function. You can either pass a flat
(1D) R array with the same length as the input samples
(1:1 mapping between weights and samples), or in the case of
temporal data, you can pass a 2D array with shape |
steps |
Integer or |
callbacks |
List of |
Value
Scalar test loss (if the model has a single output and no metrics)
or list of scalars (if the model has multiple outputs
and/or metrics). The attribute model$metrics_names
will give you
the display labels for the scalar outputs.
See Also
Other model training:
compile.keras.src.models.model.Model()
predict.keras.src.models.model.Model()
predict_on_batch()
test_on_batch()
train_on_batch()