Chih-Cheng Liang
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# The Deep Learning Book http://www.deeplearningbook.org/ [下載 pdf](https://github.com/HFTrader/DeepLearningBook/raw/master/DeepLearningBook.pdf) ## 1 Introduction # Part I: Applied Math and Machine Learning Basics 2 Linear Algebra 3 Probability and Information Theory 4 Numerical Computation ## 5 Machine Learning Basics ### 5.11 Challenges Motivating Deep Learning 傳統機器學習方法在大多重要問題上表現不錯,但並無成功解決 AI 的核心問題,例如語音與物件的識別。這是深度學習需要引入的地方。 - curse of dimension: 每增加一個維度,就要增加一個數量級的資料來訓練參數 # Part II: Modern Practical Deep Networks 這裡有一段提到現代深度學習強大的地方:可以描述為一個向量映射到另一個向量的事情,也就是人類很輕易快速可以完成的事情,基本上有充足的訓練資料集深度學習都能做到。反而人類需要花一段時間思考才能完成的事,深度學習現在還做不到。這點和 2016-07-15 [Andrew Ng 的說法](http://www.pingwest.com/baidu-andrew-ng-1s/)很像。 ## 6 Deep Feedforward Networks Q: what is representation? Multi-Layer Perceptron (MLP) 是別名 神經網路與線性模型的比較:線性模型的限制在於無法捕捉兩個變數間的互動。為了捕捉 $x$ 之間的非線性關係,改進的方式是讓線性模型去學 $\phi(x)$ ,也就是把 $x$ 做非線性轉換後再學線性關係。找到適當的 $\phi$ 有三種: 1. 使用非常廣泛的 $\phi$ 。 Kernel 技:如 RBF Kernel 。缺點:在測試集的表現不佳。 1. 工人智慧手動 $\phi$ 。十年人工 + 專業領域知識。 1. 習得 $\phi$ ,這是深度學習的策略。 $y = \phi (x;\theta; w) = \phi (x;\theta)^T w$ 。這是把 $\phi$ 參數化,並兼有前兩項的優點,人可以找出夠廣泛的函數族,並把領域知識納入。 重要的設計決策: - optimizer - cost function - form of output units - activation function - number of hidden layers - number of hidden units - how networks connect to each other ### 6.2 Gradient-based Learning stochastic gradient descent 沒有全域最佳值保證,且對初始值敏感。使用權重可用小的亂數初始化, bias 可為 0 或小正整數初始化。 #### 6.2.1 Cost Function 1. 6.2.1.1 y 的完整條件分佈 2. 6.2.1.2 y 的條件統計值(例如固定某個 x 時, y 的平均數、中位數) ##### 6.2.1.1 用 Maximum likelihood 去訓練有些好處: 1. 不需為每個模型設計 cost function 2. negative log-likelihood cost function 裡面的 log 可消去某些有 exp 的 outout unit 的影響。讓本來變平的 cost function 榨出點斜率能掉。 3. 使用 maximum likelihood estimation 會讓一些常見的模型參數沒最小值 ##### 6.2.1.2 1. 在各種 function 選一個能讓條件統計值最小 --> 成本函數可視為 functional ,用變分法解。 2. 平方 norm 學 mean ,絕對值 norm 學 median 3. 但不管平方 norm 或絕對值 norm 的成本函數,用梯度下降效果都很差。有些輸出單元很快飽和,梯度降不下來。這是為什麼 cross-entropy 成本函數更流行,即使沒有必要估計完整分佈時也要用。 #### 6.2.2 Output units 成本函數的選擇和輸出單元的選擇息息相關 - 常態分配輸出用線性單元: - 二元分配輸出用 Sigmoid 單元 - Multinouli 分配輸出用 Softmax 單元 - 其他 ### 6.3 隱藏單元 隱藏單元的設計還是很活躍的研究領域,沒有太多理論指導可以依循。 #### 6.3.1 ReLU 沒激活時學不到東西 ReLu 的推廣 在小於零的地方加斜率 $$ h_i = g(z, \alpha)_i = \max(0, z_i) + \alpha_i \min(0, z_i) $$ - $\alpha_i = -1$ Absolute Value Rectification: $g(z)= |z|$ ,用於物件辨識 (Jarrett et al., 2009) - $\alpha_i = 0.01$ 或一個很小值, Leaky ReLU - Parametric ReLU (PReLU) 讓 $\alpha_i$ 用學的 - Maxout unit: (Goodfellow et al., 2013a) $$g(\textbf{z})_i = \max_{z \in \mathbb{G}^{(i)}}{z_j}$$ Maxout unit 可視為學習 Activation function ,好處是在某些時候可以省一些參數,並有冗余的部分可以抵抗 catastrophical forgetting ,一種忘掉已經訓練過的事情的現象。 #### 6.3.2 Logistic Sigmoid and Hyperbolic Tangent - 在 z 非常高或非常低的時候飽和,梯度類演算法不好做。因此在隱藏單元已不鼓勵使用這類激活函數。在成本函數可以抵銷 sigmoidal 函數飽和效果時,可用這類激活函數做輸出單元。 - 如果非要使用 sigmoidal 函數時,用 tanh 表現較良好。因為 zero-center 的性質,在整個網路少量激活時,整個深層網路會長得像線性函數,訓練比較容易。 - 在 Feedforward NN 以外的領域 sigmoidal 函數比較常用, RNN 、一些機率模型、 autoencoder 因為有額外的需求所以不能用 piecewise-linear 函數,即使 sigmoidal 有飽和問題也要含淚用 QQ #### 6.3.3 Other Hidden Units - 完全不用激活函數,(用線性函數)。神經網路有幾層放純線性函數 - softmax, RBF, softplus, hard tanh ### 6.4 架構設計 整個神經網路要有多少層?多少個隱藏單元?單元間怎麼連接? 要多深?多廣?一般而言,一層神經網路即可逼近任何函數,但有深度的話,可讓參數少很多,推廣到測試集上表現也較佳,但訓練也比較困難。 要找到理想的架構,必須透過監測驗證集,不斷實驗 #### 6.4.1 Universal approximation 性質與深度 Universal approximation theorem :一層隱藏層的神經網路,給定有限足狗多的隱藏單元,就能逼近任何想要的連續函數。 神經網路也可以逼近任何兩個有限維度離散空間之間的映射。 Universal approximation theorem 告訴我們不論我們想學什麼函數, MLP 都有辦法「表示」(represent) 這個函數。但我們沒辦法保證可以「學到」(learn) 這個函數。原因有二: 1. 優化演算法無法保證找到用來代表函數的正確參數。 2. 優化演算法可能會過擬合,找到錯誤的函數。 5.2.1 「沒有免費午餐」定理:沒有一個 SOP 可以訓練出一個函數能推廣到任何不在訓練集的點。 要使用多層的理由:雖然一層可以表達任何函數,但隱藏單元數會不合理的多(指數成長),而且可能無法學習或有很大的 Geralization error。 [help] 另外也有因為統計原因,選擇較深的模型。選擇某種機器學習模型,代表我們對想學到的函數的 prior belief 。因此選擇深度模型,代表我們想學到的函數是由少數幾個簡單的函數組成的。代表我們相信學習到的東西,是由基本的因素互相交織而成。 [help] 另外一種詮釋觀點:深度模型是要學習一個電腦程式。 #### 6.4.2 其他架構考量 是否層與層之間 fully connected ? 其他的架構常常是針對特定的問題去設計,如 RNN 或 CNN 。對於一般性的Feedforward NN ,並無特殊建議。 ### 6.5 Back-propogation and other Differenciation Algorithm #### 6.5.1 Computational Graphs Q: 價值是啥? 7 Regularization for Deep Learning 8 Optimization for Training Deep Models 9 Convolutional Networks 10 Sequence Modeling: Recurrent and Recursive Nets 11 Practical Methodology 12 Applications # Part III: Deep Learning Research 13 Linear Factor Models 14 Autoencoders 15 Representation Learning 16 Structured Probabilistic Models for Deep Learning 17 Monte Carlo Methods 18 Confronting the Partition Function 19 Approximate Inference 20 Deep Generative Models

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully