6

I am building a CNN model with Keras and tensorflow backend. I've trained the model for 6 hours. Now, I want to predict my custom external image using my model. How to do that in Keras? Thank you

1 Answer 1

5

To simplify, you could say there is usually 4 main steps when working with models (not just in Keras) :

  • building the model and compiling it : model.compile()
  • training the model with your training data : model.fit()
  • evaluating the model with your test data : model.evaluate()
  • making predictions with your target data : model.predict()

Depending on which output you need, you will have to use model.predict_proba() or model.predict_classes().

See https://keras.io/models/sequential/#sequential-model-methods for complete reference and arguments.

Keras repository has also plenty of examples : https://github.com/fchollet/keras/tree/master/examples

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.