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章 感知机
28
x = np.array([x1, x2])
w = np.array([0.5, 0.5]) #
仅权重和偏置与
AND
不同!
b = -0.2
tmp = np.sum(w*x) + b
if tmp <= 0:
return 0
else:
return 1
我们在2.2 节介绍过,与门、与非门、或门是具有相同构造的感知机,
区别只在于权重参数的值。因此,在与非门和或门的实现中,仅设置权重和
偏置的值这一点和与门的实现不同。
2.4
感知机的局限性
到这里我们已经知道,使用感知机可以实现与门、与非门、或门三种逻
辑电路。现在我们来考虑一下异或门(
XOR gate
)。
2.4.1
 异或门
异或门也被称为逻辑异或电路。如图 2
-
5 所示,仅当 x
1
x
2
中的一方为
1 时,才会输出1(“异或”是拒绝其他的意思)。那么,要用感知机实现这个
异或门的话,应该设定什么样的权重参数呢?
x
1
x
2
y
1 1
11
11
0
0
0
0
0 0
2-5 异或门的真值表
2.4  感知机的局限性 
29
实际上,用前面介绍的感知机是无法实现这个异或门的。为什么用感知
机可以实现与门、或门,却无法实现异或门呢?下面我们尝试通过画图来思
考其中的原因。
首先,我们试着将或门的动作形象化。或门的情况下,当权重参数
(
b,
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