Skip to Content
机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
book

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

by Aurélien Géron
October 2020
Intermediate to advanced
693 pages
16h 26m
Chinese
China Machine Press
Content preview from 机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
使用卷积神经网络的深度计算机视觉
397
每个颜色通道的像素强度表示为从 0 255 的字节,因此我们除以 255 即可缩放这
些特征,得到从 0 1 的浮点数。
然后,我们创建两个 7
×
7 的滤波器(一个在中间带有垂直白线,另一个在中间带有
水平白线)。
我们使用 tf.nn.conv2d() 函数应用于两个图像,这是 TensorFlow 的低层深度学习
API 的一部分。在此示例中,我们使用零填充(padding
="SAME")和步幅为 1
最后,绘制一个结果特征图(类似于图 14-5 中的右上图)。
tf.nn.conv2d() 行值得更多解释:
images 是输入的小批量(4D 张量,如前所述)。
filter 是要应用的一组滤波器(也是 4D 张量,如前所述)。
strides 等于 1,但也可以是包含四个元素的一维度组,其中两个中间元素是垂直步
幅和水平步幅(
s
h
s
w
)。第一个元素和最后一个元素必须等于 1。它们可能有一天用
于指定批处理步幅(跳过某些实例)和通道步幅(跳过某些上一层的特征图或通道)。
padding 必须为 "SAME" "VALID"
如果设置为 "SAME",则卷积层在必要时使用零填充。将输出大小设置为输入神
经元的数量除以步幅(向上取整)所得的值。例如,如果输入大小为 13 而步幅
5(见图 14-7),则输出大小为 3(即 13/5 = 2.6,向上舍入为 3)。然后根据
需要在输入周围尽可能均匀地添加零。当 ...
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

算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111665977