Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model exported to keras gets very bad evalution score #308

Closed
kayfg opened this issue Nov 13, 2018 · 4 comments
Closed

Model exported to keras gets very bad evalution score #308

kayfg opened this issue Nov 13, 2018 · 4 comments

Comments

@kayfg
Copy link

kayfg commented Nov 13, 2018

I already posted my issue in the gitter autokeras lobby and on stackoverflow but I try it here again. Link to detailed version : https://stackoverflow.com/questions/53229283/autokeras-exported-model-performs-not-as-expected

Keras version: 2.2.2
Tensorflow version: 1.12.0

So I train with a dataset of (n, 50, 50, 3) images and get models with high accuracy(0.99) and low loss(0.02). I followed the tutorial on https://autokeras.com/start/.
After final_fit I export my model with
clf.load_searcher().load_best_model().produce_keras_model().save('my_model.h5')
and load it in keras but I get very bad evaluation scores. Accuracy is at 0.12 and loss at 5.1.
Can anyone help me? I guess it is just some command I need to use before exporting or after loading to get my model working in keras.

@sethuiyer
Copy link

I believe this has to do with data transformation issues. Try using export_autokeras_model instead.

@kayfg
Copy link
Author

kayfg commented Nov 15, 2018

You mean clf.export_autokeras_model?
How can I transform this to a keras model after the export?
I can't load the autokeras model.

Unfortunately there is no alternative to
clf.load_searcher().load_best_model().produce_keras_model().save('my_model.h5')
with produce autokeras model.

@nathanningbo
Copy link

same issue

@haifeng-jin
Copy link
Collaborator

It is not possible to export the entire data pipeline to a Keras model.
Only the neural network is exported.
Without the data preprocessing, the Keras model won't perform well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants