上QQ阅读APP看书,第一时间看更新
Predicting output
When a net is trained, it can be course be used for predictions. In Keras, this is very simple. We can use the following method:
# calculate predictions
predictions = model.predict(X)
For a given input, several types of output can be computed, including a method:
- model.evaluate(): This is used to compute the loss values
- model.predict_classes(): This is used to compute category outputs
- model.predict_proba(): This is used to compute class probabilities