Skip to Content
深度学习入门 : 基于Python的理论与实现
book

深度学习入门 : 基于Python的理论与实现

by 斋藤康毅
July 2018
Intermediate to advanced
310 pages
8h 21m
Chinese
Posts & Telecom Press
Content preview from 深度学习入门 : 基于Python的理论与实现
5.5  激活函数层的实现 
141
如图 5
-
18 所示,如果正向传播时的输入值小于等于 0,则反向传播的值为 0
因此,反向传播中会使用正向传播时保存的
mask
,将从上游传来的
dout
mask
中的元素为
True
的地方设为0
ReLU层的作用就像电路中的开关一样。正向传播时,有电流通过
的话,就将开关设为ON;没有电流通过的话,就将开关设为OFF。
反向传播时,开关为ON的话,电流会直接通过;开关为OFF的话,
则不会有电流通过。
5.5.2
 Sigmoid层
接下来,我们来实现
sigmoid
函数。
sigmoid
函数由式(5.9)表示。
5.9
用计算图表示式(5.9)的话,则如图 5
-
19 所示。
5-19 sigmoid 层的计算图(仅正向传播)
1
1
y
1
× + /
exp
x
x exp(x) 1+exp(x) 1+exp(x)
5
-
19 了“
×
”和“
+
”节点外,还出现了新的“
exp
”和“ /”节
exp
”节点会进行y
= exp(
x
)
的计算,“/”节点会进行
的计算。
如图5
-
19 所示,式(5.9)的计算由局部计算的传播构成。下面我们就来
进行图5
-
19 的计算图的反向传播。这里,作为总结,我们来依次看一下反向
传播的流程。
5章 误差反向传播法
142
步骤 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

ルールズ・オブ・プログラミング ―より良いコードを書くための21のルール

ルールズ・オブ・プログラミング ―より良いコードを書くための21のルール

Chris Zimmerman, 久富木 隆一

Publisher Resources

ISBN: 9787115485588