Implementing an MLP in TensorFlow
In this section, we will build an MLP using TensorFlow. We will use Keras as the high-level API for interacting with TensorFlow. We can use the same Vertex AI Workbench notebook we created in Chapter 5 for this purpose. In that notebook, perform the following steps:
- Navigate into the folder named
Google-Machine-Learning-for-Solutions-Architects
. - Double-click on the
Chapter-09
folder within it and then double-click on theChapter-9-TF-Keras.ipynb
file to open it. - When prompted to select a kernel, select TensorFlow.
- The notebook we have opened contains some Python code that creates and tests an MLP using Keras and TensorFlow.
- Run each of the cells in the notebook by clicking on each cell and pressing Shift + Enter on your keyboard. If you see any errors related to CUDA, you can ignore them because we are not using GPUs in this notebook.
Our code in the first cell of the notebook imports the necessary libraries and modules...