According to the keras documentation:
predict_on_batch(self, x)
Returns predictions for a single batch of samples.
However, there does not seem to be any difference with the standard predict
method when called on a batch, whether it being with one or multiple elements.
model.predict_on_batch(np.zeros((n, d_in)))
is the same as
model.predict(np.zeros((n, d_in)))
(a numpy.ndarray
of shape (n, d_out
)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…