Keras is a high-level, deep learning API written in Python. It uses a simplistic API to a make model, train it, and then use it for prediction. In this shot, we’ll talk about prediction.
Read more about Keras here.
The Keras model
class API provides the method model.predict()
. The syntax below is from the TensorFlow implementation of Keras.
model.predict(
x, batch_size=None, verbose=0, steps=None, callbacks=None
)
x
: Input samples. Can be a NumPy array or a TensorFlow tensor.batch_size
: Number of samples per batch, Integer
or None
.verbose
: Verbosity mode, or .steps
: Number of steps (batches of samples) before finishing the prediction. Ignored with the default value of None
.callbacks
: List of callbacks to apply during prediction.Returns the predictions as a NumPy array.
Free Resources