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

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

by 斋藤康毅
July 2018
Intermediate to advanced
310 pages
8h 21m
Chinese
Posts & Telecom Press
Content preview from 深度学习入门 : 基于Python的理论与实现
2.5  多层感知机 
33
x
1
0
1
0
1
0
0
1
1
1
1
1
0
0
1
1
1
0
1
1
0
x
2
s
1
s
2
y
2-12 异或门的真值表
2.5.2
 异或门的实现
下面我们试着用
Python
来实现图2
-
11 所示的异或门。使用之前定义的
AND
函数、
NAND
函数、
OR
函数,可以像下面这样(轻松地)实现。
def XOR(x1, x2):
s1 = NAND(x1, x2)
s2 = OR(x1, x2)
y = AND(s1, s2)
return y
这个
XOR
函数会输出预期的结果。
XOR(0, 0) #
输出
0
XOR(1, 0) #
输出
1
XOR(0, 1) #
输出
1
XOR(1, 1) #
输出
0
这样,异或门的实现就完成了。下面我们试着用感知机的表示方法(明
确地显示神经元)来表示这个异或门,结果如图 2
-
13 所示。
如图2
-
13 所示,异或门是一种多层结构的神经网络。这里,将最左边的
一列称为第0 层,中间的一列称为第 1层,最右边的一列称为第 2 层。
2
-
13 所示的感知机与前面介绍的与门、或门的感知机(图2
-
1)形状不
同。实际上,与门、或门是单层感知机,而异或门是2 层感知机。叠加了多
层的感知机也称为多层感知机
multi-layered perceptron
)。
2章 感知机
34
2-13 用感知机表示异或门 ...
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