๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Hands-On Neural Networks with TensorFlow 2.0: Understand TensorFlow, from static graph to eager execution, and design neural networks

โœ Scribed by Paolo Galeone


Publisher
Packt Publishing
Year
2019
Tongue
English
Leaves
553
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


A comprehensive guide to developing neural network-based solutions using TensorFlow 2.0

Key Features

  • Understand the basics of machine learning and discover the power of neural networks and deep learning
  • Explore the structure of the TensorFlow framework and understand how to transition to TF 2.0
  • Solve any deep learning problem by developing neural network-based solutions using TF 2.0

Book Description

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.

What you will learn

  • Grasp machine learning and neural network techniques to solve challenging tasks
  • Apply the new features of TF 2.0 to speed up development
  • Use TensorFlow Datasets (tfds) and the tf.data API to build high-efficiency data input pipelines
  • Perform transfer learning and fine-tuning with TensorFlow Hub
  • Define and train networks to solve object detection and semantic segmentation problems
  • Train Generative Adversarial Networks (GANs) to generate images and data distributions
  • Use the SavedModel file format to put a model, or a generic computational graph, into production

Who this book is for

If you're a developer who wants to get started with machine learning and TensorFlow, or a data scientist interested in developing neural network solutions in TF 2.0, this book is for you. Experienced machine learning engineers who want to master the new features of the TensorFlow framework will also find this book useful.

Basic knowledge of calculus and a strong understanding of Python programming will help you grasp the topics covered in this book.

Table of Contents

  1. What is Machine Learning?
  2. Neural Networks and Deep Learning
  3. TensorFlow Graph Architecture
  4. TensorFlow 2.0 Architecture
  5. Efficient Data Input Pipelines and Estimator API
  6. Image Classification using TensorFlow Hub
  7. Introduction to Object Detection
  8. Semantic Segmentation and Custom Dataset Builder
  9. Generative Adversarial Networks
  10. Bringing a Model to Production

โœฆ Table of Contents


Title Page
Copyright and Credits
Hands-On Neural Networks with TensorFlow 2.0
About Packt
Why subscribe?
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Neural Network Fundamentals
What is Machine Learning?
The importance of the dataset
n-dimensional spaces
The curse of dimensionality
Supervised learning
Distances and similarities – the k-NN algorithm
Parametric models
Measuring model performance – metrics
Using accuracy
Using the confusion matrix
Precision
Recall
Classifier regime
F1 score
Using the area under the ROC curve
Mean absolute error
Mean squared error
Unsupervised learning
Semi-supervised learning
Summary
Exercises
Neural Networks and Deep Learning
Neural networks
Biological neurons
Artificial neurons
Fully connected layers
Activation functions
Loss function
Parameter initialization
Optimization
Gradient descent
Stochastic gradient descent
Mini-batch gradient descent
Gradient descent optimization algorithms
Vanilla
Momentum
ADAM
Backpropagation and automatic differentiation
Convolutional neural networks
The convolution operator
2D convolution
2D convolutions among volumes
1 x 1 x D convolutions
Regularization
Dropout
How dropout works
Inverted dropout
Dropout and L2 regularization
Data augmentation
Early stopping
Batch normalization
Summary
Exercises
Section 2: TensorFlow Fundamentals
TensorFlow Graph Architecture
Environment setup
TensorFlow 1.x environment
TensorFlow 2.0 environment
Dataflow graphs
The main structure – tf.Graph
Graph definition – from tf.Operation to tf.Tensor
Graph placement – tf.device
Graph execution – tf.Session
Variables in static graphs
tf.Variable
tf.get_variable
Model definition and training
Defining models with tf.layers
Automatic differentiation – losses and optimizers
Interacting with the graph using Python
Feeding placeholders
Writing summaries
Saving model parameters and model selection
Summary
Exercises
TensorFlow 2.0 Architecture
Relearning the framework
The Keras framework and its models
The Sequential API
The Functional API
The subclassing method
Eager execution and new features
Baseline example
Functions, not sessions
No more globals
Control flow
GradientTape
Custom training loop
Saving and restoring the model's status
Summaries and metrics
AutoGraph
Codebase migration
Summary
Exercises
Efficient Data Input Pipelines and Estimator API
Efficient data input pipelines
Input pipeline structure
The tf.data.Dataset object
Performance optimizations
Prefetching
Cache elements
Using TFRecords
Building your dataset
Data augmentation
TensorFlow Datasets – tfds
Installation
Usage
Keras integration
Eager integration
Estimator API
Data input pipeline
Custom estimators
Premade estimators
Using a Keras model
Using a canned estimator
Summary
Exercises
Section 3: The Application of Neural Networks
Image Classification Using TensorFlow Hub
Getting the data
Transfer learning
TensorFlow Hub
Using Inception v3 as a feature extractor
Adapting data to the model
Building the model – hub.KerasLayer
Training and evaluating
Training speed
Fine-tuning
When to fine-tune
TensorFlow Hub integration
Train and evaluate
Training speed
Summary
Exercises
Introduction to Object Detection
Getting the data
Object localization 
Localization as a regression problem
Intersection over Union
Average precision
Mean Average Precision
Improving the training script
Classification and localization
Multitask learning
Double-headed network
Anchor-based detectors
Anchor-boxes
Summary
Exercises
Semantic Segmentation and Custom Dataset Builder
Semantic segmentation
Challenges
Deconvolution – transposed convolution
The U-Net architecture
Create a TensorFlow DatasetBuilder
Hierarchical organization
The dataset class and DatasetInfo
Creating the dataset splits
Generating the example
Use the builder
Model training and evaluation
Data preparation
Training loop and Keras callbacks
Evaluation and inference
Summary
Exercises
Generative Adversarial Networks
Understanding GANs and their applications
Value function
Non-saturating value function
Model definition and training phase
Applications of GANs
Unconditional GANs
Preparing the data
Defining the Generator
Defining the Discriminator
Defining the loss functions
Adversarial training process in unconditional GANs
Conditional GANs
Getting the data for a conditional GAN
Defining the Generator in a conditional GAN
Defining the Discriminator in a conditional GAN
Adversarial training process 
Summary
Exercises
Bringing a Model to Production
The SavedModel serialization format
Features
Creating a SavedModel from a Keras model
Converting a SavedModel from a generic function
Python deployment
Generic computational graph
Keras models
Flat graphs
Supported deployment platforms
TensorFlow.js
Converting a SavedModel into model.json format
Converting a Keras Model into model.json format
Go Bindings and tfgo
Setup
Go bindings
Working with tfgo
Summary
Exercises
Other Books You May Enjoy
Leave a review - let other readers know what you think


๐Ÿ“œ SIMILAR VOLUMES


Hands-On Convolutional Neural Networks w
โœ Iffat Zafar; Giounona Tzanidou; Richard Burton; Nimesh Patel; Leonardo Araujo ๐Ÿ“‚ Library ๐Ÿ“… 2018 ๐Ÿ› Packt Publishing Ltd ๐ŸŒ English

Learn how to apply TensorFlow to a wide range of deep learning and Machine Learning problems with this practical guide on training CNNs for image classification, image recognition, object detection and many computer vision challenges. Key Features Learn the fundamentals of Convolutional Neural Netwo

Hands-On Convolutional Neural Networks w
โœ Iffat Zafar; Giounona Tzanidou; Richard Burton; Nimesh Patel; Leonardo Araujo ๐Ÿ“‚ Library ๐Ÿ“… 2018 ๐Ÿ› Packt Publishing Ltd ๐ŸŒ English

Learn how to apply TensorFlow to a wide range of deep learning and Machine Learning problems with this practical guide on training CNNs for image classification, image recognition, object detection and many computer vision challenges. Key Features Learn the fundamentals of Convolutional Neural Netwo

Hands-on convolutional neural networks w
โœ Zafar, Iffat ๐Ÿ“‚ Library ๐Ÿ“… 2018 ๐Ÿ› Packt Publishing ๐ŸŒ English

<p><b>Learn how to apply TensorFlow to a wide range of deep learning and Machine Learning problems with this practical guide on training CNNs for image classification, image recognition, object detection and many computer vision challenges.</b><p><b>Key Features</b><p><li>Learn the fundamentals of C

Mastering TensorFlow: Unleashing the Pow
โœ Hasanraza Ansari ๐Ÿ“‚ Library ๐Ÿ“… 2024 ๐ŸŒ English

Dive into the world of deep learning with "Mastering TensorFlow," your comprehensive guide to harnessing the full potential of TensorFlow for building powerful neural networks. Whether you're a beginner or an experienced practitioner, this book will equip you with the knowledge and skills to tackle

Neural Networks with Python: Design CNNs
โœ Mei Wong ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› GitforGits ๐ŸŒ English

"Neural Networks with Python" serves as an introductory guide for those taking their first steps into neural network development with Python. It's tailored to assist beginners in understanding the foundational elements of neural networks and to provide them with the confidence to delve deeper into t