Creating and fine-tuning a powerful image classifier
We will now use the AutoKeras ImageClassifier
class to find the best classification model. Just for this little example, we set max_trials
(the maximum number of different Keras models to try) to 2
, and we do not set the epochs
parameter so that it will use an adaptive number of epochs automatically. For real use, it is recommended to set a large number of trials. The code is shown here:
clf = ak.ImageClassifier(max_trials=2)
Let's run the training to search for the optimal classifier for the CIFAR-10 training dataset, as follows:
clf.fit(x_train, y_train)
Here is the output:
The previous output shows that the accuracy of the training dataset is increasing.
As it has to process thousands of color images, the models that AutoKeras will generate will be more expensive to train, so this process will take hours, even using graphics...