Book Image

Hands-On Neural Networks with TensorFlow 2.0

By : Paolo Galeone
Book Image

Hands-On Neural Networks with TensorFlow 2.0

By: Paolo Galeone

Overview of this book

TensorFlow, the most popular and widely used machine learning framework, has made it possible for almost anyone to develop machine learning solutions with ease. With TensorFlow (TF) 2.0, you'll explore a revamped framework structure, offering a wide variety of new features aimed at improving productivity and ease of use for developers. This book covers machine learning with a focus on developing neural network-based solutions. You'll start by getting familiar with the concepts and techniques required to build solutions to deep learning problems. As you advance, you’ll learn how to create classifiers, build object detection and semantic segmentation networks, train generative models, and speed up the development process using TF 2.0 tools such as TensorFlow Datasets and TensorFlow Hub. By the end of this TensorFlow book, you'll be ready to solve any machine learning problem by developing solutions using TF 2.0 and putting them into production.
Table of Contents (15 chapters)
Free Chapter
1
Section 1: Neural Network Fundamentals
4
Section 2: TensorFlow Fundamentals
8
Section 3: The Application of Neural Networks

To get the most out of this book

You need to have a basic understanding of neural networks, but this is not mandatory since the topics will be covered from both a theoretical and a practical point of view. Working knowledge of basic machine learning algorithms is a plus. You need a good working knowledge of Python 3.

You should already know how to install packages using pip, how to set up your working environment to work with TensorFlow, and how to enable (if available) GPU acceleration. Moreover, a good background knowledge of programming concepts, such as imperative language versus descriptive language and object-oriented programming, is required.

The environment setup will be covered in Chapter 3, TensorFlow Graph Architecture, after the first two chapters on machine learning and neural network theory.

Download the example code files

You can download the example code files for this book from your account at www.packt.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:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. 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/Hands-On-Neural-Networks-with-TensorFlow-2.0. 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!

Download the color images

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, user input, and Twitter handles. Here is an example: "Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system."

A block of code is set as follows:

writer = tf.summary.FileWriter("log/two_graphs/g1", g1)
writer = tf.summary.FileWriter("log/two_graphs/g2", g2)
writer.close()

Any command-line input or output is written as follows:

# create the virtualenv in the current folder (tf2)
pipenv --python 3.7
# run a new shell that uses the just created virtualenv
pipenv shell
# install, in the current virtualenv, tensorflow
pip install tensorflow==2.0
#or for GPU support: pip install tensorflow-gpu==2.0

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: "The second peculiarity of the tf.Graph structure is its graph collections."

Warnings or important notes appear like this.
Tips and tricks appear like this.