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 实际预测,其输出是目标值,根据输入数据预测。

 
  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM