Open CHH3213 opened 2 years ago
https://blog.csdn.net/DoReAGON/article/details/88552348
-model.evaluate
model.evaluate
输入数据和标签,输出损失和精确度.
# 评估模型,不输出预测结果 loss,accuracy = model.evaluate(X_test,Y_test) print('\ntest loss',loss) print('accuracy',accuracy)
model.predict
#模型预测,输入测试集,输出预测结果 y_pred = model.predict(X_test,batch_size = 1)
https://blog.csdn.net/DoReAGON/article/details/88552348
-
model.evaluate
输入数据和标签,输出损失和精确度.
model.predict
输入测试数据,输出预测结果 (通常用在需要得到预测结果的时候)