|
| 1 | +Python Machine Learning - Code Examples |
| 2 | + |
| 3 | + |
| 4 | +## Chapter 14: Going Deeper – The Mechanics of TensorFlow |
| 5 | + |
| 6 | + |
| 7 | +### Chapter Outline |
| 8 | + |
| 9 | +- The key features of TensorFlow |
| 10 | + - TensorFlow's computation graphs: migrating to TensorFlow v2 |
| 11 | + - Understanding computation graphs |
| 12 | + - Creating a graph in TensorFlow v1.x |
| 13 | + - Migrating a graph to TensorFlow v2 |
| 14 | + - Loading input data into a model: TensorFlow v1.x style |
| 15 | + - Loading input data into a model: TensorFlow v2 style |
| 16 | + - Improving computational performance with function decorators |
| 17 | + - TensorFlow Variable objects for storing and updating model parameters |
| 18 | + - Computing gradients via automatic differentiation and GradientTape |
| 19 | + - Computing the gradients of the loss with respect to trainable variables |
| 20 | + - Computing gradients with respect to nontrainable tensors |
| 21 | + - Keeping resources for multiple gradient computations |
| 22 | +- Simplifying implementations of common architectures via the Keras API |
| 23 | + - Solving an XOR classification problem |
| 24 | + - Making model building more flexible with Keras' functional API |
| 25 | + - Implementing models based on Keras' Model class |
| 26 | + - Writing custom Keras layers |
| 27 | +- TensorFlow Estimators |
| 28 | + - Working with feature columns |
| 29 | + - Machine learning with pre-made Estimators |
| 30 | + - Using Estimators for MNIST handwritten digit classification |
| 31 | + - Creating a custom Estimator from an existing Keras model |
| 32 | +- Summary |
| 33 | + |
| 34 | +### A note on using the code examples |
| 35 | + |
| 36 | +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. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +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: |
| 43 | + |
| 44 | + conda install jupyter notebook |
| 45 | + |
| 46 | +Then you can launch jupyter notebook by executing |
| 47 | + |
| 48 | + jupyter notebook |
| 49 | + |
| 50 | +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. |
| 51 | + |
| 52 | +**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**. |
| 53 | + |
| 54 | +**(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))** |
| 55 | + |
| 56 | +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. |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +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