keras中model.evaluate 和 model.predict的区别

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.quora.com/What-is-the-difference-between-keras-evaluate-and-keras-predict

猜你喜欢

转载自blog.csdn.net/qq_34840129/article/details/86307424