Vinita Silaparasetty
Bangalore, India
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-5801-9 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-5801-9 e-ISBN 978-1-4842-5802-6
https://doi.org/10.1007/978-1-4842-5802-6
Apress Standard
Vinita Silaparasetty 2020
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Preface
TensorFlow 2.0 was officially released on September 30th, 2019. However, the new version is very different than what most users are familiar with. While programming with TensorFlow 2.0 is much simpler, most users still prefer to use older versions. This book aims to help long-time users of TensorFlow adjust to TensorFlow 2.0 and to help absolute beginners learn TensorFlow 2.0.
Why use TensorFlow?
Here are some advantages to using TensorFlow for your deep learning projects.
It is open source.
It is reliable (has minimal major bugs).
It is ideal for perceptual and language understanding tasks.
It is capable of running on CPUs and GPUs.
It is easier to debug.
It uses graphs for numeric computations.
It has better scalability, as libraries can be deployed on a gamut of hardware machines, starting from cellular devices to computers with complex setups.
It has convenient pipelining, as it is highly parallel and designed to use various backend software (GPU, ASIC, etc.).
It uses the high-level Keras API.
It has better compatibility.
It uses TensorFlow Extended (TFX) for a full production ML pipeline.
It also supports an ecosystem of powerful add-on libraries and models to experiment with, including Ragged Tensors, TensorFlow Probability, Tensor2Tensor, and BERT.
Figure I-1
Comparison of TensorFlow 1.x and TensorFlow 2.0
About the Book Projects
The projects in this book mainly cover image and sound data. They are designed to be as simple as possible to help you understand how each neural network works. Consider them to be a skeletal structure for your own projects. You are encouraged to build on the models in this book and experiment with them using different datasets. The projects in this book were designed keeping in mind the latest developments in deep learning and will be the perfect addition for an impressive data science portfolio.
System Specifications
The projects in this book require powerful computing resources or a good cloud platform. You are strongly advised to use a system with the following minimum requirements :
GPU: Model: 16-bit Memory: 8GB and CUDA Toolkit support
RAM: Memory: 10GB
CPU: PCIe lanes: 8 Core: 4 threads per GPU
SSD: Form Factor: 2.5-inch and SATA interface
PSU: 16.8 watts
Motherboard: PCIe lanes: 8
If you are unable to acquire a system with these requirements, try using a cloud computing platform, such as one of the following:
BigML
Amazon Web Services
Microsoft Azure
Google Cloud
Alibaba Cloud
Kubernetes
Tips to Get the Most Out of This Book
To get the most value out of the projects in this book, follow these guidelines:
Create separate environments. To prevent problems, its best to create separate environments for each project. This way you will have only the libraries necessary for that particular project and there will not be any clashes.
Save your projects in separate folders. To keep your work organized and handy for future reference, create separate folders for each project. You can store the script, datasets, and results that you have obtained in that folder. Each project in this book provides the code to set your file path to work directly in the project folder that you created.
Use data wisely. Ensure that you have enough data to divide into training and test sets. I suggest that you use 80% of the data for training and 20% for testing.
Be organized. By creating a folder for your project, you know that all the data, output files, etc. are available in one place.
Make backups. Make copies of each notebook before experimenting. This way you have one working copy as a template for future projects. Then make copies of it and modify it as required.
Plan. Understand the problem statement and create a rough flowchart of your approach to solving the problem.
Consider your presentation. As a data scientist, your inferences will be discussed by members of a company who have technical knowledge as well as those who do not. So be sure that you can convey your findings in a manner that anyone can understand.