- Deep Learning with Keras
- Antonio Gulli Sujit Pal
- 75字
- 2021-07-02 23:58:06
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