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

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

by 斋藤康毅
July 2018
Intermediate to advanced
310 pages
8h 21m
Chinese
Posts & Telecom Press
Content preview from 深度学习入门 : 基于Python的理论与实现
7章 卷积神经网络
228
现在,使用这个
SimpleConvNet
学习
MNIST
数据集。用于学习的代码
4.5 节中介绍的代码基本相同,因此这里不再罗列(源代码在
ch07/train_
convnet.py
)。
如果使用
MNIST
数据集训练
SimpleConvNet
,则训练数据的识别率为
99.82
%
,测试数据的识别率为98.96
%
(每次学习的识别精度都会发生一些误
差)。测试数据的识别率大约为99
%
,就小型网络来说,这是一个非常高的
识别率。下一章,我们会通过进一步叠加层来加深网络,实现测试数据的识
别率超过99
%
的网络。
如上所述,卷积层和池化层是图像识别中必备的模块。
CNN
可以有效
读取图像中的某种特性,在手写数字识别中,还可以实现高精度的识别。
7.6
CNN的可视化
CNN
中用到的卷积层在“观察”什么呢?本节将通过卷积层的可视化,
探索
CNN
中到底进行了什么处理。
7.6.1
 第1层权重的可视化
刚才我们对
MNIST
数据集进行了简单的
CNN
学习。当时,第 1 层的
卷积层的权重的形状是
(
30, 1, 5, 5
)
,即 30 个大小为5
×
5、通道为1 的滤波
器。滤波器大小是5
×
5、通道数是1,意味着滤波器可以可视化为1 通道的
灰度图像。现在,我们将卷积层(第1 层)的滤波器显示为图像。这里,我
们来比较一下学习前和学习后的权重,结果如图7
-
24 所示(源代码在
ch07/
visualize_filter.py
)。
7
-
24 中,学习前的滤波器是随机进行初始化的,所以在黑白的浓淡上
没有规律可循,但学习后的滤波器变成了有规律的图像。我们发现, ...
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