predict.keras.src.models.model.Model | R Documentation |
Generates output predictions for the input samples.
## S3 method for class 'keras.src.models.model.Model'
predict(
object,
x,
...,
batch_size = NULL,
verbose = getOption("keras.verbose", default = "auto"),
steps = NULL,
callbacks = NULL
)
object |
Keras model object |
x |
Input samples. It can be:
|
... |
For forward/backward compatability. |
batch_size |
Integer or |
verbose |
|
steps |
Total number of steps (batches of samples) to draw before
declaring the prediction round finished. If |
callbacks |
List of |
Computation is done in batches. This method is designed for batch processing of large numbers of inputs. It is not intended for use inside of loops that iterate over your data and process small numbers of inputs at a time.
For small numbers of inputs that fit in one batch,
directly call the model model$call
for faster execution, e.g.,
model(x)
, or model(x, training = FALSE)
if you have layers such as
BatchNormalization
that behave differently during
inference.
R array(s) of predictions.
See this FAQ entry
for more details about the difference between Model
methods
predict()
and call()
.
Other model training:
compile.keras.src.models.model.Model()
evaluate.keras.src.models.model.Model()
predict_on_batch()
test_on_batch()
train_on_batch()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.