I have two questions :
1/ What is the difference between model.evaluate() and model.predict() ?
2/ How does Keras calculate each one of them ?
I have two questions :
1/ What is the difference between model.evaluate() and model.predict() ?
2/ How does Keras calculate each one of them ?
I am going for model.predict in beginning as model.predict is executed inside model.evaluate. model.predict only predict the output matrix on the basis of the test set as the model directs.
However, model.evaluate performs a model.predict operation internally and calculate the errors and accuracy depending on supplied parameters at the time of of model compilation. For example
model.compile(optimizer=OPTIMIZER, loss='categorical_crossentropy', metrics=['mse','mae','accuracy'])
Here I have asked model to supply output mse, mae, and accuracy. But it will not provide anything if we execute model.predictexcept output matrix, and then with respect to output we need to calculate error or accuracy. On the other hand, model.evaluate is a compact version which will calculate mse, mae, and accuracy all together and will provide a matrix like
[0.2498760256045422,0.015400263790238618,,0.9456890699253224]
It's similar like [mse, mae, accuracy]
Call is yours, anything you can pickup.