Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Deep Learning from the Basics

You're reading from   Deep Learning from the Basics Python and Deep Learning: Theory and Implementation

Arrow left icon
Product type Paperback
Published in Mar 2021
Publisher Packt
ISBN-13 9781800206137
Length 316 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Shigeo Yushita Shigeo Yushita
Author Profile Icon Shigeo Yushita
Shigeo Yushita
Koki Saitoh Koki Saitoh
Author Profile Icon Koki Saitoh
Koki Saitoh
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface Introduction 1. Introduction to Python FREE CHAPTER 2. Perceptrons 3. Neural Networks 4. Neural Network Training 5. Backpropagation 6. Training Techniques 7. Convolutional Neural Networks 8. Deep Learning Appendix A

Implementing the Activation Function Layer

Now, we will apply the idea of a computational graph to a neural network. Here, we will implement the "layers" that constitute a neural network in one class using the ReLU and Sigmoid layers, which are activation functions.

ReLU Layer

A Rectified Linear Unit (ReLU) is used as an activation function and is expressed by the following equation (5.7):

49

(5.7)

From the preceding equation (5.7), you can obtain the derivative of y with respect to x with equation (5.8):

48

(5.8)

As equation (5.8) shows, if the input in forward propagation, x, is larger than 0, backward propagation passes the upstream value downstream without changing it. Meanwhile, if x is 0 or smaller in forward propagation, the signal stops there in backward propagation. You...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime