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

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

by 斋藤康毅
July 2018
Intermediate to advanced
310 pages
8h 21m
Chinese
Posts & Telecom Press
Content preview from 深度学习入门 : 基于Python的理论与实现
3.6  手写数字识别 
75
执行上面的代码后,会显示“
Accuracy:
0.9352”。这表示有93.52
%
的数
据被正确分类了。目前我们的目标是运行学习到的神经网络,所以不讨论识
别精度本身,不过以后我们会花精力在神经网络的结构和学习方法上,思考
如何进一步提高这个精度。实际上,我们打算把精度提高到99
%
以上。
另外,在这个例子中,我们把
load_mnist
函数的参数
normalize
设置成了
True
。将
normalize
设置成
True
后,函数内部会进行转换,将图像的各个像
素值除以255,使得数据的值在0.0
1.0 的范围内。像这样把数据限定到某
个范围内的处理称为正规化
normalization
)。此外,对神经网络的输入数据
进行某种既定的转换称为预处理
pre-processing
)。这里,作为对输入图像的
一种预处理,我们进行了正规化。
预处理在神经网络(深度学习)中非常实用,其有效性已在提高识别
性能和学习的效率等众多实验中得到证明。在刚才的例子中,作为
一种预处理,我们将各个像素值除以255,进行了简单的正规化。
实际上,很多预处理都会考虑到数据的整体分布。比如,利用数据
整体的均值或标准差,移动数据,使数据整体以0为中心分布,或
者进行正规化,把数据的延展控制在一定范围内。除此之外,还有
将数据整体的分布形状均匀化的方法,即数据白化(whitening)等。
3.6.3
 批处理
以上就是处理
MNIST
数据集的神经网络的实现,现在我们来关注输入
数据和权重参数的“形状”。再看一下刚才的代码实现。 ...
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, 久富木 隆一
プロダクトマネージャーのしごと 第2版 ―1日目から使える実践ガイド

プロダクトマネージャーのしごと 第2版 ―1日目から使える実践ガイド

Matt LeMay, 永瀬 美穂, 吉羽 龍太郎, 原田 騎郎, 高橋 一貴

Publisher Resources

ISBN: 9787115485588