|
| 1 | +Python Machine Learning - Code Examples |
| 2 | + |
| 3 | + |
| 4 | +## Chapter 13: Parallelizing Neural Network Training with TensorFlow |
| 5 | + |
| 6 | + |
| 7 | +### Chapter Outline |
| 8 | + |
| 9 | +- TensorFlow and training performance |
| 10 | + - Performance challenges |
| 11 | + - What is TensorFlow? |
| 12 | + - How we will learn TensorFlow |
| 13 | +- First steps with TensorFlow |
| 14 | + - Installing TensorFlow |
| 15 | + - Creating tensors in TensorFlow |
| 16 | + - Manipulating the data type and shape of a tensor |
| 17 | + - Applying mathematical operations to tensors |
| 18 | + - Split, stack, and concatenate tensors |
| 19 | + - Building input pipelines using tf.data – the TensorFlow Dataset API |
| 20 | + - Creating a TensorFlow Dataset from existing tensors |
| 21 | + - Combining two tensors into a joint dataset |
| 22 | + - Shuffle, batch, and repeat |
| 23 | + - Creating a dataset from files on your local storage disk |
| 24 | + - Fetching available datasets from the `tensorflow_datasets` library |
| 25 | +- Building an NN model in TensorFlow |
| 26 | + - The TensorFlow Keras API (tf.keras) |
| 27 | + - Building a linear regression model |
| 28 | + - Model training via the `.compile()` and `.fit()` methods |
| 29 | + - Building a multilayer perceptron for classifying flowers in the Iris dataset |
| 30 | + - Evaluating the trained model on the test dataset |
| 31 | + - Saving and reloading the trained model |
| 32 | +- Choosing activation functions for multilayer NNs |
| 33 | + - Logistic function recap |
| 34 | + - Estimating class probabilities in multiclass classification via the softmax function |
| 35 | + - Broadening the output spectrum using a hyperbolic tangent |
| 36 | + - Rectified linear unit activation |
| 37 | +- Summary |
| 38 | + |
| 39 | +### A note on using the code examples |
| 40 | + |
| 41 | +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. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +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: |
| 48 | + |
| 49 | + conda install jupyter notebook |
| 50 | + |
| 51 | +Then you can launch jupyter notebook by executing |
| 52 | + |
| 53 | + jupyter notebook |
| 54 | + |
| 55 | +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. |
| 56 | + |
| 57 | +**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**. |
| 58 | + |
| 59 | +**(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: [`ch12.ipynb`](ch12.ipynb))** |
| 60 | + |
| 61 | +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. |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +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