Creating and fine-tuning a powerful image regressor
Because we want to predict age, and this is a scalar value, we are going to use AutoKeras ImageRegressor
as an age predictor. We set max_trials
(the maximum number of different Keras models to try) to 10
, 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:
reg = ak.ImageRegressor(max_trials=10)
Let's run the training model to search for the optimal regressor for the training dataset, as follows:
reg.fit(train_imgs, train_ages)
Here is the output of the preceding code:
The previous output shows that the loss for the training dataset is decreasing.
This training process has taken 1 hour in Colaboratory. We have limited the search to 10 architectures (max_trials = 10
) and restricted the...