To simplify, we can say that when working with models (not only in Keras) there are usually 4 main steps:
- building a model and compiling it: model.compile ()
- training a model with training data: model.fit ()
- evaluating the model with your test data: model.evaluate ()
- making forecasts with your target data: model.predict ()
Depending on what result you need, you will have to use model.predict_proba () or model.predict_classes ().
See https://keras.io/models/sequential/#sequential-model-methods for full help and arguments.
The Keras repository also has many examples: https://github.com/fchollet/keras/tree/master/examples
Gaarv source share