09.05.2023 Views

pdfcoffee

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table of Contents

Prefacexi

Chapter 1: Neural Network Foundations with TensorFlow 2.0 1

What is TensorFlow (TF)? 1

What is Keras? 3

What are the most important changes in TensorFlow 2.0? 3

Introduction to neural networks 5

Perceptron6

A first example of TensorFlow 2.0 code 7

Multi-layer perceptron – our first example of a network 8

Problems in training the perceptron and their solutions 9

Activation function – sigmoid 10

Activation function – tanh 10

Activation function – ReLU 11

Two additional activation functions – ELU and LeakyReLU 12

Activation functions 13

In short – what are neural networks after all? 13

A real example – recognizing handwritten digits 14

One-hot encoding (OHE) 14

Defining a simple neural network in TensorFlow 2.0 15

Running a simple TensorFlow 2.0 net and establishing a baseline 20

Improving the simple net in TensorFlow 2.0 with hidden layers 21

Further improving the simple net in TensorFlow with Dropout 24

Testing different optimizers in TensorFlow 2.0 26

Increasing the number of epochs 32

Controlling the optimizer learning rate 33

Increasing the number of internal hidden neurons 34

[ i ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!