Difference between model.evaluate vs model.predict in Keras

The  model.evaluate  function predicts the output for the given input and then computes the metrics function specified in the  model.compile  and based on  y_true  and  y_pred  and returns the computed metric value as the output.
The  model.predict  just returns back the  y_pred .
 
 

model.evaluate函数预测给定输入的输出,然后计算model.compile中指定的metrics函数,并基于y_true和y_pred,并返回计算的度量值作为输出。
model.predict只返回y_pred。

model.evaluate 用于评估您训练的模型。它的输出是准确度或损失,而不是对输入数据的预测。

model.predict 实际预测,其输出是目标值,根据输入数据预测。

 
  

 

原文地址:https://www.cnblogs.com/jins-note/p/9997551.html