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 深度學習|內行人的做法
278
|
第六章:深度網路的調整
損失函數
損失函數可以讓最佳化函數知道它在預期的工作中表現如何。在本章前半段討論模型目
標時,我們曾談及損失函數的使用(輸出層損失函數)。以下就是一些關於損失函數其
他使用場景的說明,包括在哪裡可以最有效地使用它,以及關於如何使用它的一些警
告。說得直接一點,其實損失函數只用於兩個地方:
輸出層(或 LossLayer 損失層)
支援無監督逐層預訓練的層;例如自動編碼器、RBM VA E
大多數層(卷積層、稠密層、LSTM 層等)都沒有(也無法)具有損失函數,因為無法
以逐層方式進行預訓練。
除了本章前面所列出的分類損失函數之外,其他分類損失函數還包括樞紐損失函數
hinge loss)與邏輯損失函數(logistic loss)。如果網路必須針對硬分類進行最佳化,
樞紐損失函數就是最常用的損失函數;例如,0 = 非詐欺,1 = 詐欺,按慣例稱之為 0-1
分類器。如果比較想知道的是機率而不是硬分類,就可以使用邏輯損失函數。最好的
例子就是,透過真人參與其中的(human-in-the-loop)解決方式,標記出潛在的詐欺行
為,或是預測使用者點擊廣告的機率。如果想要預測出有效的機率值,就表示要生成 0
1 之間的數字。
二元分類與樞紐損失函數
樞紐損失函數主要是用於二元分類的情況。樞紐損失函數也有針對多類別
分類(例如一對全部或一對一)的擴展,不過此處並不會詳述。
瞭解訓練期間的 debug 除錯輸出
在訓練期間,我們會看到如下所示的指令行輸出:
21:36:00.358 ...
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