The mathematical concepts in this book should be accessible to anyone with basic knowledge of matrices and statistics. The programming knowledge required for this book is an intermediate level of Python programming. This book is biased toward the use of functions over classes, though not always. The recipes in this book use TensorFlow, which is available at https://www.tensorflow.org/, and are based on Python 3, available at https://www.python.org/downloads/. Most of the recipes will initially require the use of an internet connection to download the necessary data. The reader should be aware that as TensorFlow progresses and is developed by the open source community, the code may become obsolete or may not even work in some cases. Updated code and examples can be found on the author's GitHub site at https://github.com/nfmcclure/tensorflow_cookbook, or alternatively, on the Packt code repository at https://github.com/PacktPublishing/TensorFlow-Machine-Learning-Cookbook-Second-Edition.
To get the most out of this book
Download the example code files
You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packtpub.com.
- Select the SUPPORT tab.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/TensorFlow-Machine-Learning-Cookbook-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, and user input. Here is an example: "Here, we define our loss function, our_loss_fun(), which will return the loss we need."
A block of code is set as follows:
embedding_matrix = tf.Variable(tf.random_uniform([n, m], -1.0, 1.0))
embedding_output = tf.nn.embedding_lookup(embedding_matrix, x_data_placeholder)
Any command-line input or output is written as follows:
$ mkdir css
$ cd css
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."