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.5  超参数的验证 
195
通过进行集成学习,神经网络的识别精度可以提高好几个百分点。
这个集成学习与Dropout有密切的关系。这是因为可以将Dropout
理解为,通过在学习过程中随机删除神经元,从而每一次都让不同
的模型进行学习。并且,推理时,通过对神经元的输出乘以删除比
例(比如,0.5 等),可以取得模型的平均值。也就是说,可以理解成,
Dropout将集成学习的效果(模拟地)通过一个网络实现了。
6.5
超参数的验证
神经网络中,除了权重和偏置等参数,超参数
hyper-parameter
)也
常出现。这里所说的超参数是指,比如各层的神经元数量、
batch
大小、参
数更新时的学习率或权值衰减等。如果这些超参数没有设置合适的值,模型
的性能就会很差。虽然超参数的取值非常重要,但是在决定超参数的过程中
一般会伴随很多的试错。本节将介绍尽可能高效地寻找超参数的值的方法。
6.5.1
 验证数据
之前我们使用的数据集分成了训练数据和测试数据,训练数据用于学习,
测试数据用于评估泛化能力。由此,就可以评估是否只过度拟合了训练数据
(是否发生了过拟合),以及泛化能力如何等。
下面我们要对超参数设置各种各样的值以进行验证。这里要注意的是,
不能使用测试数据评估超参数的性能。这一点非常重要,但也容易被忽视。
为什么不能用测试数据评估超参数的性能呢?这是因为如果使用测试数
据调整超参数,超参数的值会对测试数据发生过拟合。换句话说,用测试数
据确认超参数的值的“好坏”,就会导致超参数的值被调整为只拟合测试数据。
这样的话,可能就会得到不能拟合其他数据、泛化能力低的模型。 ...
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