Sunday, March 21, 2021

Colab(一):啟動

Colab(一):啟動

2020/12/27

前言:

本文蒐集了一些 Colab 的入門資料,以便開始在雲端寫作 Python 程式,並實做機器學習與深度學習專案。作為系列文章的第一篇,只選了幾個最基本的主題介紹。主要是設定工作環境,特別是網路硬碟。

-----

Summary:

Colab [1] 是 Google 提供的雲端 Python 工作環境 [2] - [4],並有免費的 GPU 可以使用 [5],檔案可以存放在 Google Drive 或是 Github [6]。一開始可以先察看 Colab 使用的 Python 版本 [7], [8]。如果要使用自己的 Google Drive 存取資料以便進行機器學習專案,要先登入自己的 Google Account 取得驗證碼 [8], [9]。讀者可以自行練習輸入些簡單的程式碼 [10]。

-----


https://pixabay.com/zh/photos/lab-research-chemistry-test-217043/

-----

一、啟動 Colab。

-----

開始頁面 [1]。


右下角的藍字,新增筆記本。

-----

二、切換至英文。切換至 GPU。

-----


上方的,說明,查看英文版本。

單純使用 Python 的話,不用切換至 GPU 模式。如果要切換,於上方 Runtime、Change runtime type,由 None 改為 GPU 即可。

-----

三、察看目前 Python 的版本。

-----

首先在畫面的左上角 + Code。

有兩個方法。

方法一 [7]。:!python -V。可得 Python 3.7.10。

方法二 [8]。:import sys; print(sys.version_info)。可得 sys.version_info(major=3, minor=7, micro=10, releaselevel='final', serial=0)。

-----

四、使用 Google Drive。

-----

方法一:[8]。

from google.colab import drive

drive.mount('/content/drive/')

# 點入系統提供的連結之後,登入自己的帳戶,會得到一組授權碼,將授權碼輸入後,即可存取自己的 Google drive。

!ls '/content/drive/My Drive/'

方法二:[9]。

-----

五、快速上手 [10]。

-----

1. 在 # 之後加上註解。

2. 用 print( 1 + 1 ) 輸出數學運算。

3. help(print)。

4. help()。

-----

六、存檔。

-----

可以把檔案存在 Google Drive 或 Github,也可以在網路上分享以便協同工作 [6]。

-----

◎ 實作練習

-----

1. 檢視 Python 版本 [7]。

2. 檢視 Google Drive 有哪些檔案 [8]。

3. 快速上手 [10]。

4. 存檔 [6]。

-----

References

[1] 歡迎使用 Colaboratory - Colaboratory

https://colab.research.google.com/


# 24K claps

[2] Google Colab Free GPU Tutorial. Now you can develop deep learning… | by fuat | Deep Learning Turkey | Medium

https://medium.com/deep-learning-turkey/google-colab-free-gpu-tutorial-e113627b9f5d


# 3.2K claps

[3] Getting Started With Google Colab | by Anne Bonner | Towards Data Science

https://towardsdatascience.com/getting-started-with-google-colab-f2fff97f594c


# 2.4K claps

[4] Colab: An easy way to learn and use TensorFlow | by TensorFlow | TensorFlow | Medium

https://medium.com/tensorflow/colab-an-easy-way-to-learn-and-use-tensorflow-d74d1686e309

-----

[5] 如何评价 Google Colab 提供的免费 GPU? - 知乎

https://www.zhihu.com/question/266242493

-----

[6] 推薦Python初學者的好用工具:Google Colab|數位時代

https://www.bnext.com.tw/article/52618/recommand-to-programming-language-learner-python-google-colab


[7] 透過 Google Colaboratory 學習使用 Python 做機器學習等科學計算 | by Eric ShangKuan | Medium

https://medium.com/@ericsk/%E9%80%8F%E9%81%8E-google-colaboratory-%E5%AD%B8%E7%BF%92%E4%BD%BF%E7%94%A8-python-%E5%81%9A%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92%E7%AD%89%E7%A7%91%E5%AD%B8%E8%A8%88%E7%AE%97-9f92c7bb1f50


[8] 玩具烏托邦: 貴哥的 colab 初學筆記

https://newtoypia.blogspot.com/2019/07/colab.html


[9] GoogleDrive_Tutorial.ipynb - Colaboratory

https://colab.research.google.com/drive/1i41Whco5KIb7EuntKYwTVORAkAwCmlkF

-----

[10] 3 快速上手

https://bookdown.org/tonykuoyj/hello-py/get-started.html

-----

補充:

[11] 1. Whetting Your Appetite — Python 3.9.2 documentation

https://docs.python.org/3/tutorial/appetite.html

-----

從 Colab 到 Kaggle(目錄)

https://hemingwang.blogspot.com/2021/03/colab_12.html

-----

Keras - DenseNet

 Keras - DenseNet

2021/03/21

-----

說明:

# 為本來的註解

## 為新增的註解

-----


-----

courses/densenet-keras.ipynb at master · fastai/courses · GitHub

https://github.com/fastai/courses/blob/master/deeplearning2/densenet-keras.ipynb

-----



Keras - ResNet

 Keras - ResNet

2021/03/21

-----

說明:

# 為本來的註解

## 為新增的註解

-----

## ResNet - 34

#coding=utf-8

from keras.models import Model

from keras.layers import Input,Dense,Dropout,BatchNormalization,Conv2D,MaxPooling2D,AveragePooling2D,concatenate,Activation,ZeroPadding2D

from keras.layers import add,Flatten

#from keras.layers.convolutional import Conv2D,MaxPooling2D,AveragePooling2D

import numpy as np

seed = 7

np.random.seed(seed)

 

def Conv2d_BN(x, nb_filter,kernel_size, strides=(1,1), padding='same',name=None):

    if name is not None:

        bn_name = name + '_bn'

        conv_name = name + '_conv'

    else:

        bn_name = None

        conv_name = None

 

    x = Conv2D(nb_filter,kernel_size,padding=padding,strides=strides,activation='relu',name=conv_name)(x)

    x = BatchNormalization(axis=3,name=bn_name)(x)

    return x

 

def Conv_Block(inpt,nb_filter,kernel_size,strides=(1,1), with_conv_shortcut=False):

    x = Conv2d_BN(inpt,nb_filter=nb_filter,kernel_size=kernel_size,strides=strides,padding='same')

    x = Conv2d_BN(x, nb_filter=nb_filter, kernel_size=kernel_size,padding='same')

    if with_conv_shortcut:

        shortcut = Conv2d_BN(inpt,nb_filter=nb_filter,strides=strides,kernel_size=kernel_size)

        x = add([x,shortcut])

        return x

    else:

        x = add([x,inpt])

        return x

 

inpt = Input(shape=(224,224,3))

x = ZeroPadding2D((3,3))(inpt)

x = Conv2d_BN(x,nb_filter=64,kernel_size=(7,7),strides=(2,2),padding='valid')

x = MaxPooling2D(pool_size=(3,3),strides=(2,2),padding='same')(x)

#(56,56,64)

x = Conv_Block(x,nb_filter=64,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=64,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=64,kernel_size=(3,3))

#(28,28,128)

x = Conv_Block(x,nb_filter=128,kernel_size=(3,3),strides=(2,2),with_conv_shortcut=True)

x = Conv_Block(x,nb_filter=128,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=128,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=128,kernel_size=(3,3))

#(14,14,256)

x = Conv_Block(x,nb_filter=256,kernel_size=(3,3),strides=(2,2),with_conv_shortcut=True)

x = Conv_Block(x,nb_filter=256,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=256,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=256,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=256,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=256,kernel_size=(3,3))

#(7,7,512)

x = Conv_Block(x,nb_filter=512,kernel_size=(3,3),strides=(2,2),with_conv_shortcut=True)

x = Conv_Block(x,nb_filter=512,kernel_size=(3,3))

x = Conv_Block(x,nb_filter=512,kernel_size=(3,3))

x = AveragePooling2D(pool_size=(7,7))(x)

x = Flatten()(x)

x = Dense(1000,activation='softmax')(x)

 

model = Model(inputs=inpt,outputs=x)

model.compile(loss='categorical_crossentropy',optimizer='sgd',metrics=['accuracy'])

model.summary()


-----

————————————————

版权声明:本文为CSDN博主「wmy199216」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/wmy199216/article/details/71171401

-----

Keras - NIN

 Keras - NIN

2021/03/21

-----

說明:

# 為本來的註解

## 為新增的註解

-----


-----

Network in Network(NIN) with Keras | Kaggle

https://www.kaggle.com/bingdiaoxiaomao/network-in-network-nin-with-keras

-----

Saturday, March 20, 2021

Keras - AlexNet

 Keras - AlexNet

2021/03/20

-----

說明:

# 為本來的註解

## 為新增的註解

-----

## AlexNet


#coding=utf-8

from keras.models import Sequential

from keras.layers import Dense,Flatten,Dropout

## AlexNet 架構與 LeNet 不同,但程式只多了 Dropout 一種層。

## https://keras.io/api/layers/regularization_layers/dropout/

from keras.layers.convolutional import Conv2D,MaxPooling2D

from keras.utils.np_utils import to_categorical

import numpy as np

seed = 7

np.random.seed(seed)

 

model = Sequential()

model.add(Conv2D(96,(11,11),strides=(4,4),input_shape=(227,227,3),padding='valid',activation='relu',kernel_initializer='uniform'))

model.add(MaxPooling2D(pool_size=(3,3),strides=(2,2)))

model.add(Conv2D(256,(5,5),strides=(1,1),padding='same',activation='relu',kernel_initializer='uniform'))

model.add(MaxPooling2D(pool_size=(3,3),strides=(2,2)))

model.add(Conv2D(384,(3,3),strides=(1,1),padding='same',activation='relu',kernel_initializer='uniform'))

model.add(Conv2D(384,(3,3),strides=(1,1),padding='same',activation='relu',kernel_initializer='uniform'))

model.add(Conv2D(256,(3,3),strides=(1,1),padding='same',activation='relu',kernel_initializer='uniform'))

model.add(MaxPooling2D(pool_size=(3,3),strides=(2,2)))

model.add(Flatten())

model.add(Dense(4096,activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(4096,activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(1000,activation='softmax'))

model.compile(loss='categorical_crossentropy',optimizer='sgd',metrics=['accuracy'])

model.summary()

-----

## ZFNet

model.add(Conv2D(96,(7,7),strides=(2,2),input_shape=(224,224,3),padding='valid',activation='relu',kernel_initializer='uniform')) 

## ZFNet 只有此行與 AlexNet 不同(?)。

-----

————————————————

版权声明:本文为CSDN博主「wmy199216」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/wmy199216/article/details/71171401

-----

Keras - LeNet

 Keras - LeNet

2021/03/20

-----

說明:

# 為本來的註解

## 為新增的註解

-----

## LeNet

#coding=utf-8

## utf-8 平衡 unicode 與 ASCII,且效率較 unicode 高。

## https://zh.wikipedia.org/wiki/UTF-8 

from keras.models import Sequential

## 一個空的網路,可以後續添加各種層。method 則有好幾個預設的可以使用。add()、pop()、summary() 等等。

## https://keras-cn.readthedocs.io/en/latest/getting_started/sequential_model/

## https://keras-cn.readthedocs.io/en/latest/models/sequential/

## https://keras.io/zh/getting-started/sequential-model-guide/

## https://keras.io/guides/sequential_model/

## https://keras.io/api/models/sequential/

from keras.layers import Dense,Flatten

## Dense 是全連接層,進 Dense 之前要先進 Flatten 展平。

## https://keras.io/api/layers/reshaping_layers/flatten/

from keras.layers.convolutional import Conv2D,MaxPooling2D

from keras.utils.np_utils import to_categorical

import cPickle

## cPickle。pickle 是 Python 的標準函式庫之一。cPickle 是 C 語言的版本。序列化,主要有 load() 與 dump() 兩個函數。

## https://docs.python.org/3/library/pickle.html

## https://blog.csdn.net/dcrmg/article/details/78180692

import gzip

## gzip 是 Python 的標準函式庫之一。

## https://docs.python.org/zh-tw/3/library/gzip.html

import numpy as np

seed = 7

np.random.seed(seed)

 

data = gzip.open(r'/media/wmy/document/BigData/kaggle/Digit Recognizer/mnist.pkl.gz')

train_set,valid_set,test_set = cPickle.load(data)

## cPickle.load(data)。將原始的資料集序列化之後,載入記憶體。

#train_x is [0,1]

train_x = train_set[0].reshape((-1,28,28,1))

## 「newshape int or tuple of ints。The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.」-1 表示要轉換資料長度未定,格式則根據後續的設定轉換。以此例而言。-1 表示 train_set[0],也就是 train_x 的長度不知道。反正就是把全部的資料轉成 28 x 28 x 1 就對了。

## https://numpy.org/doc/stable/reference/generated/numpy.reshape.html

## https://blog.csdn.net/wld914674505/article/details/80460042

train_y = to_categorical(train_set[1])

 

valid_x = valid_set[0].reshape((-1,28,28,1))

valid_y = to_categorical(valid_set[1])

 

test_x = test_set[0].reshape((-1,28,28,1))

test_y = to_categorical(test_set[1])

 

model = Sequential()

model.add(Conv2D(32,(5,5),strides=(1,1),input_shape=(28,28,1),padding='valid',activation='relu',kernel_initializer='uniform'))

## kernel_initializer。uniform 似乎是舊版的參數。不在說明文檔裡面。

## https://keras.io/zh/initializers/

## https://zh.wikipedia.org/wiki/%E9%80%A3%E7%BA%8C%E5%9E%8B%E5%9D%87%E5%8B%BB%E5%88%86%E5%B8%83

model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Conv2D(64,(5,5),strides=(1,1),padding='valid',activation='relu',kernel_initializer='uniform'))

## padding。valid:卷積後特徵圖縮小。same:卷積後特徵圖不縮小。

## https://oldpan.me/archives/tf-keras-padding-vaild-same

model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Flatten())

model.add(Dense(100,activation='relu'))

model.add(Dense(10,activation='softmax'))

model.compile(optimizer='sgd',loss='categorical_crossentropy',metrics=['accuracy'])

## accuracy。「對於任何分類問題,你都希望將其設置為 metrics = ['accuracy']。評估標準可以是現有標準的編碼標識符,也可以是自定義的評估標準函數。」

## https://keras.io/zh/getting-started/sequential-model-guide/

model.summary()

## model.summary()。用文字顯示模型各層的參數狀態。

## https://blog.csdn.net/ybdesire/article/details/85217688

model.fit(train_x,train_y,validation_data=(valid_x,valid_y),batch_size=20,epochs=20,verbose=2)

## verbose。「verbose = 2 為每個 epoch 輸出一行記錄。」

## https://www.jianshu.com/p/159a9ac413fa

#[0.031825309940411217, 0.98979999780654904]

print model.evaluate(test_x,test_y,batch_size=20,verbose=2)

-----

————————————————

版权声明:本文为CSDN博主「wmy199216」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/wmy199216/article/details/71171401

-----

Friday, March 19, 2021

Python Notebook

 Python Notebook

2021/03/19

-----

Python 筆記本:記錄一些要消化的東西。

-----


Fig.  Python(圖片來源)。

-----

# (18) Learn Python - Full Course for Beginners [Tutorial] - YouTube

https://www.youtube.com/watch?v=rfscVS0vtbw&t=406s

38:00 2021/03/28

-----

# (25) Intermediate Python Programming Course - YouTube

https://www.youtube.com/watch?v=HGOBQPFzWKo

-----

從 Colab 到 Kaggle(目錄)

https://hemingwang.blogspot.com/2021/03/colab_12.html

-----

Sunday, March 07, 2021

深度學習經典論文

深度學習經典論文

2021/01/28

-----

前言:

若將深度學習的核心濃縮成兩個主題:在電腦視覺 Computer Vision(CV)上,可說 CV 就是 ResNet,Ensemble 的 CNN。在自然語言處理 Natural Language Processing(NLP)上,可說 NLP 就是文字向量在垂直上的詞義 word meaning、句法 syntax、語義 semantic 分解與水平上的 Query、Key、Value(QKV)分解。底下以四十篇論文來闡述這個論點。

-----


https://pixabay.com/zh/photos/camera-photographs-souvenir-1130731/

-----

以下是論文閱讀順序的編排:

分成十個階段,選擇四十篇論文,CV 與 NLP 各半,「簡述」十篇深度學習經典論文(LeNet、NIN、ResNet、FCN、YOLO、LSTM、Seq2se2、Attention、ConvS2S、Transformer) 跟延伸的主題(AlexNet、GoogLeNet、DenseNet、PFPNet、Mask R-CNN、Word2vec、Paragraph2vec、Short Attention、ELMo、BERT)。

-----

01A:LeNet。01B:AlexNet(可補充 Dropout)。

02A:NIN(可補充 SENet)。02B:GoogLeNet(可補充 Inception v3,Label smoothing)。

03A:ResNet。03B:DenseNet(可補充 CSPNet,YOLO v4 的骨幹網路)。

04A:FCN。04B:PFPNet(可補充 Faster R-CNN 與之前的論文)。

05A:YOLO(可補充 YOLO v4)。05B:Mask R-CNN(可補充 Faster R-CNN 與之後的論文)。

-----

06A:LSTM。06B:Word2vec(詞義、句法)(可補充 C&W v2)。

07A:Seq2seq。07B:Paragraph2vec(詞義、句法、語義)(可補充 Skip-thought)。

08A:Attention。08B:Short Attention(QKV,水平分解)。

09A:ConvS2S。09B:ELMo(詞義、句法、語義,的垂直分解)(可補充 Context2vec)。

10A:Transformer。10B:BERT(詞義、句法、語義,的垂直分工,可補充 BERT NLP Pipeline)。

-----

Summary:


以下是 CV [1]-[20]。


1998 的 LeNet [1] 是經典的卷積神經網路 Convolutional Neural Network(CNN),架構包含卷積層、機活函數、池化層、全連接層、輸出層、損失函數、梯度下降與反向傳播的介紹。

2012 的 AlexNet [2] 則是第一個大獲成功的 CNN,它的圖片與資料集都比 LeNet 大。除了使用 GPU 加速,也整合了當時許多的技巧,最重要的是 Dropout [3]。Dropout 是以隨機丟棄神經元的訓練方式,使得網路具有多個子網路的平均的加成效果。Dropout 的技巧也被用在 Transformer 上。

NIN [4] 藉著通道間特徵圖的重新融合,不僅提高正確率,它的主要技巧 Conv1 可以用來升降維(增多或減少特徵圖數量)也成為後續神經網路的標準配備。SENet [5] 也探討通道間的特徵圖,但它不是如 NIN 的重新融合,而是就單一特徵圖整張的值進行放大或縮小。

GoogLeNet [6] 是 AlexNet 之後成功的深層網路,它運用 NIN 的 Conv1 將 5x5、3x3、1x1、Maxpooling 四種特徵圖重新融合並持續加深,獲得了 AlexNet 之後,新的成功。GoogLeNet 又可稱為 Inception v1。Inception v3 [7] 有一個 Label Smoothing 的技巧,有正規化的功能,可以減少過度擬合,Label Smoothing 的技巧也被用在 Transformer 上。

ResNet [8] - [12] 可說是 CNN 的核心。ResNet v1 [8] 加上 identity mapping,成功地將 VGGNet 的十九層推進到百層,但無法到千層。ResNet-D [9] 則加上 Dropout 的技巧隨機丟棄一些卷積層,成功地將網路推進到千層。ResNet v2 [10] 則是將 ReLU 搬到 identity mapping 之外,不需使用 Dropout 的技巧,也可以將網路推進到千層。ResNet-E [11] 分析了 ResNet v2,發現它其實是多的淺層網路的 ensemble。ResNet-V [12] 將 ResNet 的損失函數可視化,發現比起 VGGNet 等傳統 CNN,ResNet 的損失函數平化許多。這是因為 ensemble 的平均所造成。Dropout 也是一種 ensemble。

DenseNet [13] 有別於 ResNet 的 ensemble,它將特徵圖在後續的層重新平均,所以損失函數也呈現平滑化。DenseNet 與 ResNet 的效果接近。CFPNet [14] 減少特徵圖的計算,可以加速 ResNet 與 DenseNet 並取得接近的正確率,CFPNet 是 YOLO v4 的骨幹網路。

以上,LeNet、NIN、ResNet 是 CNN 的三個階段性演進。

FCN [15] 全卷積網路是第一個成功的語義分割網路,有別於 CNN 主要是圖片分類,FCN 的功能是像素分類,屬於 CNN 的應用。全卷積網路不需要固定輸入圖片的大小。

PFPNet [16] 是基於 FCN 的全景分割。物件偵測(以 Faster R-CNN 為例)加上語義分割(以 FCN 為例)是實例分割(以 Mask R-CNN 為例)。全景分割(以 PFPNet 為例)則是語義分割(以 FCN 為例)加上實例分割(以 Mask R-CNN 為例)。

YOLO [17] 是第一個成功的 one-stage 物件偵測,快,但是準確率不高。到 YOLO v4 [18] 的時候,快,而且準確率高。Mask R-CNN [19] 則是基於 two-stage 物件偵測的 Faster R-CNN [20] 上的實例偵測。它使用 RoIAlign 確定像素在池化前的真正位置,提高了正確率。

-----

以下是 NLP [21]-[40]。 

LSTM [21] 用來處理時序資料,若時序資料是文字,則文字需要用 Word Embedding [22] - [26] 的技巧先將文字轉成向量,才可以用 LSTM 處理。

Word2vec [22] - [24] 是經典的詞向量技巧。Word2vec 1 [22] 主要是多字預測一字的 CBOW 與一字預測多字的 skip-gram。訓練技巧在 Word2vec 2 [23] 提到有 Negative Sampling 減少不需要的取樣以及 Hierarchical Softmax 重組預測路徑來改善 Word2vec 的訓練。Word2vec 3 [24] 則是簡易論文版本。C&W v1 [25] 與 C&W v2 [26] 也是詞向量的方法。其中 C&W v2 用 window approach 在語義上的任務效能較差,因此論文作者又推出 sentence approach 的版本,此結果說明了 Sentence Embedding 的必要性。

Seq2seq 1 [27] 與 Seq2seq 2 [ 28] 是基於 LSTM(或類似的 GRU)單元的模型,主要用途也是機器翻譯。優於 LSTM 的地方在於整句讀完再輸出,避免斷章取義的缺點。

Paragraph2vec [29] 是 Sentence Embedding 句向量的方法。跟 Word2vec 類似,只是整個段落會變成一個 id 參與訓練,因此 id 就會獲得一個句向量。此方法不算實用,後續的 Skip-thought [30] 基於 Seq2seq 的架構,只是輸入句可以同時預測前一個句子與後一個句子,如此訓練效果較佳。

Attention [31] - [33] 比起 Seq2seq 將句子壓縮成單一向量的粗糙作法,它的每個輸出字都會考慮輸入句的每個字的權重。Attention 1 [31] 考慮的是整個輸入句,Visual Attention [32] 將 Attention 的概念用在圖片文字的轉換上。Attention 2 [33] 則是在 Attention 1 的 Global Attention 上,又增加了 Local Attention。

Short Attention [34] 則是在 Memory Network 的基礎上,仔細探討詞向量如何分解成 Query、Key、Value 三個向量。Key 類似 index,Value 是實際的內容,Query 則是下一個字的預測的機率分布。QKV 被使用於 ConvS2S 與 Transformer。

ConvS2S [35] 不使用傳統的 LSTM,而是用一維的 CNN 來處理文字向量,因此可以用 GPU 加速。QKV 的分解也改善了結果。

ELMo [36] 是 Context2vec [37] 的較佳論文。可以改善一字多義的語義級別的 NLP 任務。它先在預訓練層級將 Word Meaning、Syntax、Semantic 三個層級的向量串接起來,然後在實際的任務訓練出個別的權重。

Transformer [38] 與 ConvS2S 架構上類似,都是 Source-Output-Target Relational Model(STORM)。最大的差別是 Transformer 不用卷積,並且在 Encoder 與 Decoder 兩端都先使用全連接的 self-attention,可以精確地理解每個字在句子中代表哪個其他的字。

BERT [39] 使用雙向的 Transformer Encoder 的模型先進行預訓練。預訓練有兩個方法,克漏字類似 CBOW,預測缺少的字,以及下個句子預測,類似 Skip-gram。後續再加上簡單的線性輸出層,進行四種主要的 NLP 任務。BERT NLP [40] 則是用實驗分析 BERT 在詞向量的輸入後,BERT 的低層主要實現 Syntax 的功能,高層主要實現 Semantic 的功能。

-----

結語:

Summary 的內容,簡單以四十篇論文,總結了深度學習的機器視覺與自然語言處理的演進,核心我們再說一次::在電腦視覺 Computer Vision(CV)上,可說 CV 就是 ResNet,Ensemble 的 CNN。在自然語言處理 Natural Language Processing(NLP)上,可說 NLP 就是文字向量在垂直上的詞義 word meaning、句法 syntax、語義 semantic 分解與水平上的 Query、Key、Value(QKV)分解。

-----

References


# 01A

[1] LeNet。

LeCun, Yann, et al. "Gradient-based learning applied to document recognition." Proceedings of the IEEE 86.11 (1998): 2278-2324.

http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf


# 01B

[2] AlexNet。(Dropout)。

Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional neural networks." Advances in neural information processing systems 25 (2012): 1097-1105.

https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf

-----

[3] Dropout。

Srivastava, Nitish, et al. "Dropout: a simple way to prevent neural networks from overfitting." The journal of machine learning research 15.1 (2014): 1929-1958.

https://www.jmlr.org/papers/volume15/srivastava14a/srivastava14a.pdf


# 02A

[4] NIN。

Lin, Min, Qiang Chen, and Shuicheng Yan. "Network in network." arXiv preprint arXiv:1312.4400 (2013).

https://arxiv.org/pdf/1312.4400.pdf


[5] SENet。

Hu, Jie, Li Shen, and Gang Sun. "Squeeze-and-excitation networks." Proceedings of the IEEE conference on computer vision and pattern recognition. 2018.

https://openaccess.thecvf.com/content_cvpr_2018/papers/Hu_Squeeze-and-Excitation_Networks_CVPR_2018_paper.pdf


# 02B

[6] GoogLeNet。(Inception 系列,到 v3 時有 Label Smoothing)。

Szegedy, Christian, et al. "Going deeper with convolutions." Proceedings of the IEEE conference on computer vision and pattern recognition. 2015.

https://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Szegedy_Going_Deeper_With_2015_CVPR_paper.pdf


[7] Inception v3。

Szegedy, Christian, et al. "Rethinking the inception architecture for computer vision." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.

https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Szegedy_Rethinking_the_Inception_CVPR_2016_paper.pdf

-----

# 03A

[8] ResNet v1。

He, Kaiming, et al. "Deep residual learning for image recognition." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.

https://openaccess.thecvf.com/content_cvpr_2016/papers/He_Deep_Residual_Learning_CVPR_2016_paper.pdf


[9] ResNet-D。

Huang, Gao, et al. "Deep networks with stochastic depth." European conference on computer vision. Springer, Cham, 2016.

https://arxiv.org/pdf/1603.09382.pdf


[10] ResNet v2。

He, Kaiming, et al. "Identity mappings in deep residual networks." European conference on computer vision. Springer, Cham, 2016.

https://arxiv.org/pdf/1603.05027.pdf


[11] ResNet-E。

Veit, Andreas, Michael J. Wilber, and Serge Belongie. "Residual networks behave like ensembles of relatively shallow networks." Advances in neural information processing systems. 2016.

https://papers.nips.cc/paper/2016/file/37bc2f75bf1bcfe8450a1a41c200364c-Paper.pdf


[12] ResNet-V。

Li, Hao, et al. "Visualizing the loss landscape of neural nets." Advances in Neural Information Processing Systems. 2018.

https://papers.nips.cc/paper/2018/file/a41b3bb3e6b050b6c9067c67f663b915-Paper.pdf


# 03B

[13] DenseNet。

Huang, Gao, et al. "Densely connected convolutional networks." Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.

https://openaccess.thecvf.com/content_cvpr_2017/papers/Huang_Densely_Connected_Convolutional_CVPR_2017_paper.pdf


[14] CSPNet。

Wang, Chien-Yao, et al. "CSPNet: A new backbone that can enhance learning capability of cnn." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. 2020.

https://openaccess.thecvf.com/content_CVPRW_2020/papers/w28/Wang_CSPNet_A_New_Backbone_That_Can_Enhance_Learning_Capability_of_CVPRW_2020_paper.pdf


# 04A

[15] FCN。

Long, Jonathan, Evan Shelhamer, and Trevor Darrell. "Fully convolutional networks for semantic segmentation." Proceedings of the IEEE conference on computer vision and pattern recognition. 2015.

https://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Long_Fully_Convolutional_Networks_2015_CVPR_paper.pdf


# 04B

[16] PFPNet。

Kirillov, Alexander, et al. "Panoptic feature pyramid networks." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2019.

https://openaccess.thecvf.com/content_CVPR_2019/papers/Kirillov_Panoptic_Feature_Pyramid_Networks_CVPR_2019_paper.pdf


# 05A

[17] YOLO。被引用 12295 次。

Redmon, Joseph, et al. "You only look once: Unified, real-time object detection." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.

https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Redmon_You_Only_Look_CVPR_2016_paper.pdf


[18] YOLOv4。

Bochkovskiy, Alexey, Chien-Yao Wang, and Hong-Yuan Mark Liao. "YOLOv4: Optimal Speed and Accuracy of Object Detection." arXiv preprint arXiv:2004.10934 (2020).

https://arxiv.org/pdf/2004.10934.pdf


# 05B

[19] Mask R-CNN。

He, Kaiming, et al. "Mask r-cnn." Proceedings of the IEEE international conference on computer vision. 2017.

https://openaccess.thecvf.com/content_ICCV_2017/papers/He_Mask_R-CNN_ICCV_2017_paper.pdf


[20] Faster R-CNN。

Ren, Shaoqing, et al. "Faster r-cnn: Towards real-time object detection with region proposal networks." arXiv preprint arXiv:1506.01497 (2015).

https://arxiv.org/pdf/1506.01497.pdf


# 06A

[21] LSTM。

Hochreiter, Sepp, and Jürgen Schmidhuber. "Long short-term memory." Neural computation 9.8 (1997): 1735-1780.

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.676.4320&rep=rep1&type=pdf


# 06B

[22] Word2vec 1。

Mikolov, Tomas, et al. "Efficient estimation of word representations in vector space." arXiv preprint arXiv:1301.3781 (2013).

https://arxiv.org/pdf/1301.3781.pdf


[23] Word2vec 2。

Mikolov, Tomas, et al. "Distributed representations of words and phrases and their compositionality." Advances in neural information processing systems. 2013.

https://papers.nips.cc/paper/2013/file/9aa42b31882ec039965f3c4923ce901b-Paper.pdf


[24] Word2vec 3。

Rong, Xin. "word2vec parameter learning explained." arXiv preprint arXiv:1411.2738 (2014).

https://arxiv.org/pdf/1411.2738.pdf


[25] C&W v1。

Collobert, Ronan, and Jason Weston. "A unified architecture for natural language processing: Deep neural networks with multitask learning." Proceedings of the 25th international conference on Machine learning. 2008.

http://www.cs.columbia.edu/~smaskey/CS6998-Fall2012/supportmaterial/colbert_dbn_nlp.pdf


[26] C&W v2。

Collobert, Ronan, et al. "Natural language processing (almost) from scratch." Journal of machine learning research 12.ARTICLE (2011): 2493-2537.

https://www.jmlr.org/papers/volume12/collobert11a/collobert11a.pdf


# 07A

[27] Seq2seq 1。

Sutskever, Ilya, Oriol Vinyals, and Quoc V. Le. "Sequence to sequence learning with neural networks." Advances in neural information processing systems. 2014.

http://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf


[28] Seq2seq 2。

Cho, Kyunghyun, et al. "Learning phrase representations using RNN encoder-decoder for statistical machine translation." arXiv preprint arXiv:1406.1078 (2014).

https://arxiv.org/pdf/1406.1078.pdf


# 07B

[29] Paragraph2vec。

Le, Quoc, and Tomas Mikolov. "Distributed representations of sentences and documents." International conference on machine learning. 2014.

http://proceedings.mlr.press/v32/le14.pdf


[30] Skip-thought。

Kiros, Ryan, et al. "Skip-thought vectors." arXiv preprint arXiv:1506.06726 (2015).

https://arxiv.org/pdf/1506.06726.pdf


# 08A

[31] Attention 1。

Bahdanau, Dzmitry, Kyunghyun Cho, and Yoshua Bengio. "Neural machine translation by jointly learning to align and translate." arXiv preprint arXiv:1409.0473 (2014).

https://arxiv.org/pdf/1409.0473.pdf


[32] Visual Attention。

Xu, Kelvin, et al. "Show, attend and tell: Neural image caption generation with visual attention." International conference on machine learning. 2015.

http://proceedings.mlr.press/v37/xuc15.pdf


[33] Attention 2。

Luong, Minh-Thang, Hieu Pham, and Christopher D. Manning. "Effective approaches to attention-based neural machine translation." arXiv preprint arXiv:1508.04025 (2015).

https://arxiv.org/pdf/1508.04025.pdf


# 08B

[34] Short Attention。

Daniluk, Michał, et al. "Frustratingly short attention spans in neural language modeling." arXiv preprint arXiv:1702.04521 (2017).

https://arxiv.org/pdf/1702.04521.pdf


# 09A

[35] ConvS2S。

Gehring, Jonas, et al. "Convolutional sequence to sequence learning." arXiv preprint arXiv:1705.03122 (2017).

https://arxiv.org/pdf/1705.03122.pdf


# 09B

[36] ELMo。

Peters, Matthew E., et al. "Deep contextualized word representations." arXiv preprint arXiv:1802.05365 (2018).

https://arxiv.org/pdf/1802.05365.pdf


[37] Context2vec。被引用 312 次。

Melamud, Oren, Jacob Goldberger, and Ido Dagan. "context2vec: Learning generic context embedding with bidirectional lstm." Proceedings of the 20th SIGNLL conference on computational natural language learning. 2016.

https://www.aclweb.org/anthology/K16-1006.pdf


# 10A

[38] Transformer。

Vaswani, Ashish, et al. "Attention is all you need." Advances in neural information processing systems. 2017.

https://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf


# 10B

[39] BERT。

Devlin, Jacob, et al. "Bert: Pre-training of deep bidirectional transformers for language understanding." arXiv preprint arXiv:1810.04805 (2018).

https://arxiv.org/pdf/1810.04805.pdf


[40] BERT NLP Pipeline。

Tenney, Ian, Dipanjan Das, and Ellie Pavlick. "BERT rediscovers the classical NLP pipeline." arXiv preprint arXiv:1905.05950 (2019).

https://arxiv.org/pdf/1905.05950.pdf

-----

Sunday, February 28, 2021

DRL

DRL

2021/02/28

-----


https://pixabay.com/zh/photos/spring-background-flower-yellow-316535/

-----

References

# CSI

Tsai, Yu-Han, Yu-Jie Jheng, and Rua-Huan Tsaih. "The Cramming, Softening and Integrating Learning Algorithm with Parametric ReLu Activation Function for Binary Input/Output Problems." 2019 International Joint Conference on Neural Networks (IJCNN). IEEE, 2019.

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8852023&casa_token=JqH4St9aBBEAAAAA:32RPdY7OqKbV7j9fttvgqo-H59Wh2U6EXq50TAmo2is5H-N_5hsOuEayk3O-PSUkbhqGJmsl


# The Cramming, Softening and Integrating Learning Algorithm for Real Input/Binary Output Problems - 政大學術集成

https://ah.nccu.edu.tw/item?item_id=145746&locale=en-US


# 蔡 瑞煌 | 政治大學商學院-資訊管理學系

https://mis2.nccu.edu.tw/zh_tw/Faculty/Faculty_01/%E8%94%A1-%E7%91%9E%E7%85%8C-71626392


#【5分钟 Paper】DQN - 知乎

https://zhuanlan.zhihu.com/p/113120993


# Open AI Gym 簡介與 Q learning 演算法實作

https://blog.techbridge.cc/2017/11/04/openai-gym-intro-and-q-learning/


# DQN 的延伸論文

Justesen, Niels, et al. "Deep learning for video game playing." IEEE Transactions on Games 12.1 (2019): 1-20.

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8632747&casa_token=ZSYX1uPfY58AAAAA:sun0R0vWWblM8Hj5C5MHPgJTjeJKYRfreWOI50-MDRw375WWbgUaitm3exi60-BHEQAIz3PT&tag=1

-----

Saturday, February 27, 2021

林文月

 林文月

2021/02/27

-----


https://pixabay.com/zh/photos/tree-cat-silhouette-moon-full-moon-736877/

-----

12:00

-----

回到高雄老家已經一個禮拜了,接下來,這裡就是家了。


收拾出一個房間,電腦可以工作。持續準備論文內容時,心情也舒緩一些了。林文月的書,擬古,本來在大妹的書架,現在還是在書架,但已經是我的書架了。


試著開始讀一點書,擬古是第一選擇。為何,我不知。也許歷史性與實驗性吸引了我。


開卷讀完序之後,興起查一下作者資料,1933/09/05,八字是癸酉庚申甲戌,七殺格正印化殺,格局頗大,時柱推測是甲子,以台大教授,正印得地,加以推論。其母為連橫長女。星盤先以台北午時排出,還看不出太多東西。

2021/02/27

-----


04:00

-----

由《飲膳札記》推測為丙寅時,食神有力而透。當然考取師大藝術系也可推論為丁卯時,傷官透,但此傷官不旺,食神卻旺,所以食神還是比較有可能。丙寅對沖庚申,丁卯對沖癸酉。星盤有月亮對沖木星。

《飲膳札記》好讀有。

香港八日草。

枕草子。

枕草子我買過,應該是木馬文化的周作人版本。印象不是很深刻。林文月的翻譯,卻是很不錯。

香港是個有趣的地方。搬家回高雄之前,神遊了幾年。主要是四個山徑。麥理浩徑,衛奕信徑,鳳凰徑,港島徑。在清大跑操場時,就搭配想像在這些山徑上奔馳。更早一點有港劇。金庸,倪匡,自不待言。

日本文學也挺有意思。只是我的日文程度,只能看一點日本動畫,僅此而已。

2021/02/27

-----



Thursday, February 25, 2021

NAS-RL

 NAS-RL

2019/12/20

-----

References

# NAS-RL

Zoph, Barret, and Quoc V. Le. "Neural architecture search with reinforcement learning." arXiv preprint arXiv:1611.01578 (2016).
https://arxiv.org/pdf/1611.01578.pdf 

论文笔记-NAS - 知乎
https://zhuanlan.zhihu.com/p/47221948

Reinforcement Learning 4:Policy Gradient

強化學習(四):Policy Gradient

2020/04/18

-----


// 強化學習演進路線 [7]。

-----

References

[1] 深度强化学习cs294 Lecture5: Policy Gradients Introduction_人工智能_无所知的博客-CSDN博客
https://blog.csdn.net/qq_25037903/article/details/84573048

[2] CS 285
http://rail.eecs.berkeley.edu/deeprlcourse/

[3] CS294-112 Fa18 9/5/18 - YouTube
https://m.youtube.com/watch?v=XGmd3wcyDg8&list=PLkFD6_40KJIxJMR-j5A1mkxK26gh_qg37&index=21

[4] 强化学习系列(十三):Policy Gradient Methods_网络_LagrangeSK的博客-CSDN博客
https://blog.csdn.net/lagrangesk/article/details/82865578

[5] Teaching - David Silver
https://www.davidsilver.uk/teaching/

[6] RL Course by David Silver - Lecture 7: Policy Gradient Methods - YouTube
https://m.youtube.com/watch?v=KHZVXao4qXs

[7] 强化学习演进路线 - 知乎
https://zhuanlan.zhihu.com/p/49429128

-----


-----


-----


-----


 -----


 -----

Reinforcement Learning 3:Lilian Weng

強化學習(三):Lilian Weng

2020/04/17


-----


// [1]。

-----


圖一,強化學習的基礎 [1]。

-----


圖二,DP、MC、TD、PG [1]。

-----


圖三,SARS [1]。

-----


圖四,強化學習三要素 [1]。

-----


圖五,Reward Function and Policy [1]。

-----


圖六,Value Function [1]。

-----


圖七,State Value and Action Value [1]。

-----


圖八,Optimal Value and Policy [1]。

-----


圖九,Markov Decision Process [1]。

-----


圖十,圖解 Markov Decision Process [1]。

-----


圖十一,Bellman Equations [1]。

-----


圖十二,圖解 Bellman Expectation Equations [1]。

-----


圖十三,Bellman Expectation Equations [1]。

-----


圖十四,Bellman Optimality Equations [1]。

-----


圖十五,Policy Evaluation and Policy Improvement [1]。

-----


圖十六,Policy Iteration [1]。

-----

References

[1] A (Long) Peek into Reinforcement Learning
https://lilianweng.github.io/lil-log/2018/02/19/a-long-peek-into-reinforcement-learning.html

[2] 強化學習(二):綜述型論文
http://hemingwang.blogspot.com/2020/04/reinforcement-learningsurvey-paper.html

[3] 強化學習(一):簡介
http://hemingwang.blogspot.com/2020/04/reinforcement-learningan-introduction.html


Reinforcement Learning 2:Survey Paper

強化學習(二):綜述型論文

2020/04/17

-----



// Two dimensions of RL [3]。

-----


// Reinforcement Learning [1]。

-----


// SARS [1]。

-----


// Two dimensions of RL [3]。

-----


// Epsilon-greedy [1]。

-----


// Monte Carlo [1]。

-----


// Sarsa and Q-learning [1]。

-----


// Actor Critic [3]。

-----


// REINFORCEwb [2]。

-----


// Actor Critic [2]。

-----


// Actor Critic [4]。

-----


// Sarsa [4] 。

-----


// Actor Critic [4]。

-----

References

[1] System
Nguyen, Ngoc Duy, Thanh Nguyen, and Saeid Nahavandi. "System design perspective for human-level agents using deep reinforcement learning: A survey." IEEE Access 5 (2017): 27091-27102.
https://ieeexplore.ieee.org/ielx7/6287639/7859429/08119919.pdf?tp=&arnumber=8119919&isnumber=7859429&ref=aHR0cHM6Ly9zY2hvbGFyLmdvb2dsZS5jb20udHcvc2Nob2xhcj9obD16aC1UVyZhc19zZHQ9MCUyQzUmcT1zeXN0ZW0rZGVzaWduK2RlZXArcmVpbmZvcmNlbWVudCZvcT1zeXN0ZW0rZGVzaWduK2RlZXArcmU=

[2] Overview
Yuxi. "Deep reinforcement learning: An overview." arXiv preprint arXiv:1701.07274 (2017).
https://arxiv.org/pdf/1701.07274.pdf

[3] Survey
Arulkumaran, Kai, et al. "Deep reinforcement learning: A brief survey." IEEE Signal Processing Magazine 34.6 (2017): 26-38.
https://www.gwern.net/docs/rl/2017-arulkumaran.pdf

[4] Algorithms
Csaba. "Algorithms for reinforcement learning." Synthesis lectures on artificial intelligence and machine learning 4.1 (2010): 1-103.
https://sites.ualberta.ca/~szepesva/papers/RLAlgsInMDPs.pdf

Reinforcement Learning 1:An Introduction

強化學習(一):簡介

2020/04/17

-----


Demystifying Deep Reinforcement Learning | Computational Neuroscience Lab
https://neuro.cs.ut.ee/demystifying-deep-reinforcement-learning/

-----


Deep Reinforcement Learning

TD(Q-learning):DQN、DDQN、DNA、NAF、C51、QR-DQN、HER、DQfD、Rainbow。
AC(Actor-Critic):A3C(A2C)、(DRQN)UNREAL、DPG、DDPG、TD3、SAC、ACKTR。
PG(REINFORCE):TRPO、PPO、PDO、CPO、IPO。

-----


// AlphaGo [1]。

-----


// DQN [1]。

-----


// NAS-RL [2]。

-----


// SARS [1]。

-----


Demystifying Deep Reinforcement Learning | Computational Neuroscience Lab
https://neuro.cs.ut.ee/demystifying-deep-reinforcement-learning/

-----


Q-Learning : A Maneuver of Mazes - Becoming Human: Artificial Intelligence Magazine
https://becominghuman.ai/q-learning-a-maneuver-of-mazes-885137e957e4

-----


My Journey to Reinforcement Learning — Part 1: Q-Learning with Table
https://towardsdatascience.com/my-journey-to-reinforcement-learning-part-1-q-learning-with-table-35540020bcf9

-----


Q-Learning : A Maneuver of Mazes - Becoming Human: Artificial Intelligence Magazine
https://becominghuman.ai/q-learning-a-maneuver-of-mazes-885137e957e4

-----


Introduction to Reinforcement Learning — Deep Reinforcement Learning for Hackers (Part 0)
https://medium.com/@curiousily/getting-your-feet-rewarded-deep-reinforcement-learning-for-hackers-part-0-900ca5bb83e5

-----


Q-learning - Wikipedia
https://en.m.wikipedia.org/wiki/Q-learning

-----


Introduction to Deep Q-Learning for Reinforcement Learning (in Python)
https://www.analyticsvidhya.com/blog/2019/04/introduction-deep-q-learning-python/

-----


// Sarsa [3]。

-----


// Q-learning [3]。

-----


// Sarsa and Q-learning [4]。

-----


Deep-Learning-Papers-Reading-Roadmap/README.md at master · floodsung/Deep-Learning-Papers-Reading-Roadmap · GitHub
https://github.com/floodsung/Deep-Learning-Papers-Reading-Roadmap/blob/master/README.md

-----


// 強化學習演進路線 [5]。

-----


// 一些強化學習的演算法 [6], [7]。

-----


[1708.07902] Deep Learning for Video Game Playing
https://arxiv.org/abs/1708.07902

-----


[1910.09615] IPO: Interior-point Policy Optimization under Constraints
https://arxiv.org/abs/1910.09615

-----


[1910.09615] IPO: Interior-point Policy Optimization under Constraints
https://arxiv.org/abs/1910.09615

-----


用Python實作強化學習|使用TensorFlow與OpenAI Gym
http://books.gotop.com.tw/v_ACD017800

-----


GitHub - Curt-Park/rainbow-is-all-you-need: Rainbow is all you need! A step-by-step tutorial from DQN to Rainbow
https://github.com/Curt-Park/rainbow-is-all-you-need

-----


GitHub - MrSyee/pg-is-all-you-need: Policy Gradient is all you need! A step-by-step tutorial for well-known PG methods.
https://github.com/MrSyee/pg-is-all-you-need

-----

References

[1] 強化學習 Reinforcement Learning
https://www.slideshare.net/mobile/yenlung/reinforcement-learning-90737484

[2] [論文閱讀]Neural Architecture Search with Reinforcement Learning – AMMAI
https://sss050531.wordpress.com/2018/06/09/論文閱讀neural-architecture-search-with-reinforcement-learning/

[3] 强化学习(七)--Q-Learning和Sarsa - 知乎
https://zhuanlan.zhihu.com/p/46850008

[4] artificial intelligence - What is the difference between Q-learning and SARSA? - Stack Overflow
https://stackoverflow.com/questions/6848828/what-is-the-difference-between-q-learning-and-sarsa

[5] 强化学习演进路线 - 知乎
https://zhuanlan.zhihu.com/p/49429128

[6] Reinforcement Learning algorithms — an intuitive overview
https://medium.com/@SmartLabAI/reinforcement-learning-algorithms-an-intuitive-overview-904e2dff5bbc

[7] Part 2: Kinds of RL Algorithms — Spinning Up documentation
https://spinningup.openai.com/en/latest/spinningup/rl_intro2.html