Creating a multitask/multimodal model
Based on the example provided at the beginning of this chapter, the model that we are going to create will take an image and its structured data attributes as input and will predict a category value and a scalar value. In this case, instead of using a dataset, we will generate our own data. The notebook we will be using that contains the complete source code can be found at https://github.com/PacktPublishing/Automated-Machine-Learning-with-AutoKeras/blob/main/Chapter09/Chapter9_MultiModel.ipynb.
Now, let's have a look at the relevant cells of the notebook in detail:
- Installing AutoKeras: As we've mentioned in the previous chapters, this snippet at the top of the notebook is responsible for installing AutoKeras and its dependencies using the pip package manager:
!pip3 install autokeras
- Importing the necessary packages: The following lines load TensorFlow, the built-in Keras Reuters dataset,
numpy
, andAutoKeras
as the necessary...