|
| 1 | +Python Machine Learning - Code Examples |
| 2 | + |
| 3 | + |
| 4 | +## Chapter 15: Classifying Images with Deep Convolutional Neural Networks |
| 5 | + |
| 6 | + |
| 7 | +### Chapter Outline |
| 8 | + |
| 9 | +- The building blocks of CNNs |
| 10 | + - Understanding CNNs and feature hierarchies |
| 11 | + - Performing discrete convolutions |
| 12 | + - Discrete convolutions in one dimension |
| 13 | + - Padding inputs to control the size of the output feature maps |
| 14 | + - Determining the size of the convolution output |
| 15 | + - Performing a discrete convolution in 2D |
| 16 | + - Subsampling layers |
| 17 | + - Putting everything together – implementing a CNN |
| 18 | + - Working with multiple input or color channels |
| 19 | + - Regularizing an NN with dropout |
| 20 | + - Loss functions for classification |
| 21 | +- Implementing a deep CNN using TensorFlow |
| 22 | + - The multilayer CNN architecture |
| 23 | + - Loading and preprocessing the data |
| 24 | + - Implementing a CNN using the TensorFlow Keras API |
| 25 | + - Configuring CNN layers in Keras |
| 26 | + - Constructing a CNN in Keras |
| 27 | + - Gender classification from face images using a CNN |
| 28 | + - Loading the CelebA dataset |
| 29 | + - Image transformation and data augmentation |
| 30 | + - Training a CNN gender classifier |
| 31 | +- Summary |
| 32 | + |
| 33 | +### A note on using the code examples |
| 34 | + |
| 35 | +The recommended way to interact with the code examples in this book is via Jupyter Notebook (the `.ipynb` files). Using Jupyter Notebook, you will be able to execute the code step by step and have all the resulting outputs (including plots and images) all in one convenient document. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +Setting up Jupyter Notebook is really easy: if you are using the Anaconda Python distribution, all you need to install jupyter notebook is to execute the following command in your terminal: |
| 42 | + |
| 43 | + conda install jupyter notebook |
| 44 | + |
| 45 | +Then you can launch jupyter notebook by executing |
| 46 | + |
| 47 | + jupyter notebook |
| 48 | + |
| 49 | +A window will open up in your browser, which you can then use to navigate to the target directory that contains the `.ipynb` file you wish to open. |
| 50 | + |
| 51 | +**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**. |
| 52 | + |
| 53 | +**(Even if you decide not to install Jupyter Notebook, note that you can also view the notebook files on GitHub by simply clicking on them: [`ch15_part1.ipynb`](ch15_part1.ipynb) and [`ch15_part2.ipynb`](ch15_part2.ipynb))** |
| 54 | + |
| 55 | +In addition to the code examples, I added a table of contents to each Jupyter notebook as well as section headers that are consistent with the content of the book. Also, I included the original images and figures in hope that these make it easier to navigate and work with the code interactively as you are reading the book. |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +When I was creating these notebooks, I was hoping to make your reading (and coding) experience as convenient as possible! However, if you don't wish to use Jupyter Notebooks, I also converted these notebooks to regular Python script files (`.py` files) that can be viewed and edited in any plaintext editor. |
0 commit comments