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章 与学习相关的技巧
176
从图6
-
9 的结果中可知,与
SGD
相比,其他 3 种方法学习得更快,而且
速度基本相同,仔细看的话,
AdaGrad
的学习进行得稍微快一点。这个实验
需要注意的地方是,实验结果会随学习率等超参数、神经网络的结构(几层
深等)的不同而发生变化。不过,一般而言,与
SGD
相比,其他 3 种方法可
以学习得更快,有时最终的识别精度也更高。
6.2
权重的初始值
在神经网络的学习中,权重的初始值特别重要。实际上,设定什么样的
权重初始值,经常关系到神经网络的学习能否成功。本节将介绍权重初始值
的推荐值,并通过实验确认神经网络的学习是否会快速进行。
6.2.1
 可以将权重初始值设为0吗
后面我们会介绍抑制过拟合、提高泛化能力的技巧——权值衰减(
weight
decay
)。简单地说,权值衰减就是一种以减小权重参数的值为目的进行学习
的方法。通过减小权重参数的值来抑制过拟合的发生。
如果想减小权重的值,一开始就将初始值设为较小的值才是正途。实际上,
在这之前的权重初始值都是像
0.01 * np.random.randn(10, 100)
这样,使用
由高斯分布生成的值乘以0.01 后得到的值(标准差为 0.01 的高斯分布)。
如果我们把权重初始值全部设为0 以减小权重的值,会怎么样呢?从结
论来说,将权重初始值设为0 不是一个好主意。事实上,将权重初始值设为
0 的话,将无法正确进行学习。
为什么不能将权重初始值设为0 呢?严格地说,为什么不能将权重初始
值设成一样的值呢?这是因为在误差反向传播法中,所有的权重值都会进行 ...
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