Lectured by Yun-Nung Vivian Chen 陳縕儂 @ NTU CSIE
個人用筆記
1. 深度學習介紹
電腦會做甚麼?
電腦只會做你要它做的事情,並不會突然做其他事情!所以人工智慧並不會摧毀人類啦😁
使用機器學習處理問題
預測句子的情緒
我們可以機器學習來處理這類型的問題,把句子當成輸入,情緒反應是輸出。並且把這個過程想像是在解數學方程式一樣。將 x(句子) 放進 f(機器學習函式) 並且產生出 y(情緒反應) 。這個函式我們人不用去想要怎麼制定,讓電腦程式自己學習就好。
我喜歡這個產品 > 正向
這產品用起來太麻煩了 > 負面
他有一點點貴 > 中性
機器學習就是在找一個方程式
- 語音辨識,輸出 "你好"
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 手寫辨識,輸出 "2"
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 天氣預報
利用昨天天氣
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
產生出 今天天氣
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
機器學習過程
輸入 x: "it claims too much."
輸出 y: -(negative),y又稱label。
- 將資料輸入進來,並做處理,形成 Training Data 。
- 建立內涵有許多預設函式的 Model 。
- 開始進行 Traning ,想辦法找出最適合的函式。
- 找到後即可輸出 Best Function
- 準備 Testing Data 資料。
- 將資料進行 Testing 驗證步驟4的函式準確度是否足夠。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
何謂深度學習?
使用多層函式的機器學習
因為當初的時代背景,電腦運算能力有限,所以 Model 裡的函式通常只有一個,需要透過專家先將資料進行進階處理,才能將資料餵給電腦運算。電腦在針對這些處理好的資料,來找出特徵,並且產出相對應的函式。
深度學習是機器學習的一種,因為電腦運算能力的提升,所以 Model 裡的函示可以變成很多層。一層一層慢慢找出特徵,在給出最終的結果。因為特徵是讓電腦使用一些預設的方法,慢慢窮舉所找出來,所以一般人也可以輕鬆做出深度學習的程式。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
深度學習過程
深度學習又稱類神經網路,因為其模型長相跟人類的神經元很類似。
我們只需將資料 X ,轉換成模型可以讀懂的格式,中間的隱藏層會自動去找出特徵,經過一輪運算後,會輸出結果 Y。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
深度學習Model VS 機器學習Model的差別圖
機器模型Shallow Model,其中綠色的部分,都是需要透過專家將資料進行轉換的部分。
深度學習Deep Model,全部都可以讓電腦自己學,所以資料量自然而然就要更多。
聲音辨識
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
圖像辨識
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
類神經網路
前面有提到深度學習,就像是人類的神經一樣。人類的神經是由神經元以及樹突所組成的。
神經元就是圖中形狀為圓形的細胞。樹突就是細細長長用來連接神經元的部分。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
類神經網路就是模仿人類神經所衍生出來的。
其中藍色圓形的部分就代表神經元,連接的線就是樹突。
綠色代表輸入層,黃色代表輸出層。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
電腦中的神經元長怎樣?
左邊的橘色部分所需要處理資料,這些資料需要乘上一個weight權重,然後再加上bias誤差,最後經過一個Activation Function激勵函式。
Sigmoid Function: 可以將數值變成0~1之間的數字。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
深度學習歷史
- 1960 感知器模型(單層神經網路)
- 1969 感知器模組,會有限制。
- 1980 多層感知器模型(2層)
- 1986 反向傳播演算法
- 1989 為什麼還要那麼多層?
- 2006 RBM(restricted Boltzmann machine, 受限玻爾茲曼機)技術突破
- 2009 圖像運算卡
- 2010 語音辨識技術突破
- 2012 ImageNet專案技術突破
- 2015 超人類在影像與語音辨識上有成果
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
為什麼深度學習近年來快速成長
因為全部的資訊都是機器自己學習的,所以資料量一定要夠!在行動裝置普及後,資料量才巨量增加,加上圖形運算卡的出現,所以深度學習才開始蓬勃發展。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
為什麼GPU跟深度運算那麼合?
奇談:GPU就像人腦一樣,需要大量運算有關圖形的東西,像是想像食物的照片之類的。
速度重要嗎?
速度很重要,資料量越大,訓練時間就越久,時間太長在實際應用上就很難起到作用。
如果運算速度太慢,使用者通常也沒耐心等待。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
為什麼要「深」?
普遍的模型是長這樣,一層(shallow),或多層(deep)。資料量如果都相同,為什麼不能放在同一層?讓深度變成寬度?
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
如果以一層為 n 個神經元為主
- 以深度為優先,建構兩層的模型,複雜度就會是 d * d也就是d²。
- 以寬度為優先,建構一層模型,複雜度就是 2 * d 也就是 2d。
同樣的資料量下,複雜度越高,所能表現出來的答案也就越精細。
在同樣參數的情況下,藍色一層的準確度,明顯比灰色三層的準確度低。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
如何應用?
Classification 分類
- Sentiment Analysis 情緒分析
- Speech Phoneme Recognition 音位辨識
- Handwritten Recognition 手寫辨識
Sequence Prediction 序列預測
- POS Tagging 詞性標記
- Speech Recognition 語音辨識
- Machine Translation 翻譯
如何聚合資料?
要考慮的面相,輸入類型,資料特性等等
輸入類型可以是:文字、照片、聲音、或是日誌檔(可用來做推薦系統)
資料特性可能是:持續性資料、時態資料。
- CNN(Convolutional neural network)卷積神經網路,可以用來做圖片的判斷。
- RNN(Recurrent neural network) 循環神經網路,可用來做時態資訊判斷。
參考
台大資訊 深度學習之應用 ADL 1.1 ~ 1.3
Deep Learning