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

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

by 斋藤康毅
July 2018
Intermediate to advanced
310 pages
8h 21m
Chinese
Posts & Telecom Press
Content preview from 深度学习入门 : 基于Python的理论与实现
6.2  权重的初始值 
183
接下来是初始值为
Xavier
初始值时的结果。在这种情况下,随着层的加深,
偏向一点点变大。实际上,层加深后,激活值的偏向变大,学习时会出现梯
度消失的问题。而当初始值为
He
初始值时,各层中分布的广度相同。由于
即便层加深,数据的广度也能保持不变,因此逆向传播时,也会传递合适的值。
总结一下,当激活函数使用
ReLU
时,权重初始值使用
He
初始值,当
激活函数为
sigmoid
tanh
S
型曲线函数时,初始值使用
Xavier
初始值。
这是目前的最佳实践。
6.2.4
 基于MNIST数据集的权重初始值的比较
下面通过实际的数据,观察不同的权重初始值的赋值方法会在多大程度
上影响神经网络的学习。这里,我们基于
std =
0.01
Xavier
初始值、
He
始值进行实验(源代码在
ch06/weight_init_compare.py
中)。先来看一下结果,
如图6
-
15 所示。
2.5
2.0
1.5
loss
1.0
0.5
0.0
0 500
iterations
1000 1500
2000
He
std = 0.01
Xavier
6-15  基于 MNIST 数据集的权重初始值的比较:横轴是学习的迭代次数(iterations),
纵轴是损失函数的值(loss
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