Wednesday, May 17, 2017

AI 從頭學(二四):CNN - Kernel Visualizing

AI 從頭學(二四):CNN - Kernel Visualizing

2017/05/17

上次其實是連續提問兩個問題 [5], [6]。第二個問題是:繼續推廣下去,LeNet-5 用六個,大家跑出來的 kernel 值會非常接近,都很像標準的 edge filters 嗎 [6]?

目前還不知道。

不過關於 filters 的長相,台灣大學的徐宏民教授推薦了兩篇論文 [2], [3]。[2] 是在 AlexNet [7] 的架構上繼續推廣。另外 GoogLeNet [8] 則是架構在 [3] 之上。AlexNet 與 GoogLeNet 是目前巨型 CNN 的兩大主流。

[2] 跟 [3] 之前已經簡略看了一下,我想還是另外撰寫,不要增補在這一篇裡。

-----

2017/03/30

有關 filter training,再請教一個問題。依照上回的討論,以及低階 filter 的原理,如果使用八個 filters / kernels,每個人訓練出來的結果應該都會一樣嗎?跟本文圖一 [1],Filter bank (to be learned) 這八個 filters 差不多。

繼續推廣下去,LeNet-5 用六個,大家跑出來的 kernel 值會非常接近,都很像標準的 edge filters 嗎?

-----

也謝謝 Winston Hsu 與 李盈的指導 [2]-[4]!

-----


Fig. 1. Edge filters, [1].

-----

5則留言:

(一)

Winston Hsu: The more filters (in the same layer) are the better. In generally, the filters will collaboratively learn the masks which respond for different aspects for the images.

Personally, I will strongly recommend the following paper to understand CNN -- even more readable than AlexNet.

Matthew D. Zeiler, Rob Fergus: Visualizing and Understanding Convolutional Networks. ECCV (1) 2014: 818-833

There are also couple tools which help you visualize filters (also referring the prior paper) of different layers. With that, you can understand how CNN works.

Another work worthy to investigate is NiN, Network In Network. You can try to visualize their last layer, the feature map of the last layer, which will roughly correspond to the object location.

You can start with Caffe and easily find their models (defined in prototext in Caffe Model Zoo). It is very easy to modify and finetune with the dataset.

Marcel Wang: What a wonderful comment!

Winston Hsu: Li Ying, you can try to help them in the community. She is my MS student.

Steve Yeh:Thanks for Winston's valuable comment, will start with these material.

顏志翰: 李盈 (Li Ying)welcome, 讀書會的同學!

-----

(二)

Marcel Wang: 我先自問自答一下好了。根據我目前對GAN的理解,假設樣本夠大,那訓練出來的結果,應該都會差不多。而且根據之前視覺皮層的研究,最基本的 filters 就是專門辨別不同旋轉角度的線條。

李盈: GAN ? 您是指Generative Adversarial Nerworks嗎?

Marcel Wang: 是啊!

李盈: 根據我對GAN的理解,因為它的目的其實是"generate" 應該不會有樣本夠大,結果就差不多的現象。 不過我想我需要再多看一些資料才能確定我的觀點是否正確

Marcel Wang: 生成與分解其實是一體的兩面。所以CNN提到GAN也不能算是離題。先有一個夠大的真實資料庫,那訓練出來的generator才能生成類似真實的圖片 (或音樂等)。圖本來就是線條構成。生成圖片,filters產生edges。CNN要分析圖片,也是先把圖片拆成edges。

李盈: 好像真的有data夠多,結果就能趨近一致的現象: NIPS tutorial video中有提到:GAN有Asmptotically consistent的特性:"if you are able to find the equilibrium point of the game defining a generative adversarial network, you've actually recovered the true distribution that generates the data, modulo sample coplexity issues." 這裡:(https://github.com/....../blob/master/magenta/reviews/GAN.md) 也提到了:"....Under certain conditions, this process reaches a fixed point where the generator has learned the true data distribution, and hence the discriminator cannot classify real examples from generated ones. "

-----

(三)

Marcel Wang: 所以如果有六個 filters,那每個 edge detector 之間應該是60度,八個的話,就是45度。不同的人訓練出來的結果可能會有相位旋轉的偏移。但如果水平跟垂直線比較多,那有可能偏移會被鎖定,大家的結果 就趨於一致。不過這純粹是想像,實際結果,應該要真的去跑一下資料庫才可確定。

Marcel Wang: 「只要」把LeNet-5的第一層分別用5、6、7、8個filters跑一遍,然後看一下它們的長相,其實就知道結果了!

-----

Referencs

[1] [DL] Convolutional Neural Network ? 不要停止思考
http://solring-blog.logdown.com/posts/302641-dl-convolutional-neural-network

[2] 2014_Visualizing and understanding convolutional networks

[3] 2013_Network in network

[4] magenta_GAN.md at master · tensorflow_magenta · GitHub
https://github.com/tensorflow/magenta/blob/master/magenta/reviews/GAN.md 

[5] 我對實作 CNN,filter 的選擇很有興趣,有人願意討論一下嗎?
https://www.facebook.com/groups/Taiwan.AI.Group/permalink/1803896623266104/

[6] 繼續推廣下去,LeNet-5 用六個,大家跑出來的 kernel 值會非常接近,都很像標準的 edge filters 嗎?
https://www.facebook.com/groups/Taiwan.AI.Group/permalink/1804518016537298/ 

[7] 2012_11554_Imagenet classification with deep convolutional neural networks

[8] 2015_3089_Going deeper with convolutions

No comments: