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