Exporting and importing a model in AutoKeras
One worry we might have when working with AutoML is the black-box nature of the tools available. Do we have control over the produced models? Can we extend them? Understand them? Reuse them?
Of course we can! The good thing about AutoKeras is that it is built on top of TensorFlow, so despite its sophistication, under the hood, the models being trained are just TensorFlow graphs that we can export and tweak and tune later if we need to.
In this recipe, we'll learn how to export a model trained on AutoKeras, and then import it as a plain old TensorFlow network.
Are you ready? Let's begin.
How to do it…
Follow these steps to complete this recipe:
- Import the necessary dependencies:
from autokeras import * from tensorflow.keras.datasets import fashion_mnist as fm from tensorflow.keras.models import load_model from tensorflow.keras.utils import plot_model
- Load the train and test splits of the
Fashion...