How to export/save/load the actual AutoKeras "super" model, not the underlying tensorflow model

906 views Asked by At

Is there a way to export/save/load a previously trained autokeras model? I understand I can use the following code to save/load the underlying tensorflow best model:

model = reg.export_model()
model.save(MODEL_FILEPATH, save_format="tf")    
best_model = load_model(MODEL_FILEPATH, custom_objects=ak.CUSTOM_OBJECTS)

However, in practice that wouldn't work, since my data has been fitted by autokeras, which takes care of data preparation and scaling. I don't think I have access to what autokeras is doing to the input data (X) before actually fitting, so I can't actually use the exported tensorflow best model to predict labels for new samples with un-prepared and unscaled features.

Am I missing something major here?

Also I noticed that there are some binaries in the autokeras temporary dir. That dir seems to be generated automatically. Is there a way to use that dir to load the previously-fit autokeras "super" model?

1

There are 1 answers

0
Martin Klosi On