Reader small image

You're reading from  Automated Machine Learning with AutoKeras

Product typeBook
Published inMay 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800567641
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Luis Sobrecueva
Luis Sobrecueva
author image
Luis Sobrecueva

Luis Sobrecueva is a senior software engineer and ML/DL practitioner currently working at Cabify. He has been a contributor to the OpenAI project as well as one of the contributors to the AutoKeras project.
Read more about Luis Sobrecueva

Right arrow

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:

Figure 4.13 – Notebook output of our age predictor training

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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Automated Machine Learning with AutoKeras
Published in: May 2021Publisher: PacktISBN-13: 9781800567641

Author (1)

author image
Luis Sobrecueva

Luis Sobrecueva is a senior software engineer and ML/DL practitioner currently working at Cabify. He has been a contributor to the OpenAI project as well as one of the contributors to the AutoKeras project.
Read more about Luis Sobrecueva