Skip to Content
深度學習|內行人的做法
book

深度學習|內行人的做法

by Josh Patterson, Adam Gibson
January 2019
Beginner to intermediate
576 pages
14h 31m
Chinese
GoTop Information, Inc.
Content preview from 深度學習|內行人的做法
12
|
第一章:機器學習
點積
在機器學習中,
點積
dot product
)是我們經常會遇到的一種線性代數運算方式。點積
有時也叫「內積(inner product)」或「純量積(scalar product)」。它是取兩個相同長度
的向量進行運算,然後得出單一個數字的結果。其做法就是把兩個向量中相對應的個別
項目逐一相乘,然後再全部加總起來,就可以得出最後的計算結果了。就算沒有特別說
明其中的數學含義,我們還是可以看出這個單一數字蘊含了許多訊息。
首先我們可以看到,點積可用來衡量每個向量中各個元素值的大小。如果兩個向量都具
有相當大的值,就可能得出相當大的結果,而如果只是具有相當小值的兩個向量,則只
會得出相當小的結果。如果在數學上要進行所謂「
歸一化
normalization
)」之類的處
理,往往需要計算向量之間的相對值,此時就可以運用點積運算,來做為向量之間相似
程度的一種衡量方式。針對兩個歸一化向量進行點積運算,這就是數學概念上所謂的
餘弦相似度
cosine similarity
)」。
元素級相乘
在實務上另一種常見的線性代數運算,就是所謂的「
元素級相乘
element-wise
product)」(或叫做「Hadamard 相乘」)。這種運算是針對兩個元素數量相同的向量,把
每個相對應的元素兩兩相乘,最後得出另一個同樣具有相同元素數量的新向量。
外積
兩個向量的「外積(outer product)」,也叫做「張量積(tensor product)」。我們會取縱
列向量(column vector ...
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

高效能網站建置指南

高效能網站建置指南

Steve Souders
初探深度學習|使用TensorFlow

初探深度學習|使用TensorFlow

Reza Zadeh, Bharath Ramsundar
深度学习实战

深度学习实战

Douwe Osinga

Publisher Resources

ISBN: 9789865020262