xiao sean
3 min readJan 11, 2019

--

感謝你提出想法交流,

其實因為沒 Code 我的理解可能會與原作有出入,

很開心能互相交流,

我會將之前的回覆移除,更改我的想法於此。

我覺得你對 fig3 的理解是對的,

引用你的說法:Figure3的描述是Attention visualization of the last convolutional layer of ResNet. 就是ResNet最后一个卷积层的Attention可视化呀,也就是Local Attention的可视化吧。

================= Q1.

我先整理一下我對 Local Attention 的想像

在段落 Transferable Local Attention 中有提到:

所以 Last convolution 應該指的是 Gf (ResNet-50) 的最後一層,即為 7 x 7 x 2048。

實作 Gd 應該是使用 Fully Convolutional Layer 的 Discriminator 輸出每個 Pixel 是Source/Target domain (Shape: 1 x H x W),

我在想是否他的視覺化 Attention mask 只是透過 Gd 得來的,並沒有結合 H 的元素。((訓練方式後面再探討。

Gd 會辨認該像素是否相似於 Source domain(p趨近於 1),即為熱力圖中紅色的部分。

e.g. 當輸入 Target domain 的圖片,但是 Gd 有一部分輸出為紅色,代表著那部分是較容易遷移的區域。((因為明明是 Target domain 但是圖片的那部分卻相像於 Source domain.

而視覺化是透過這概念所產生的。

==============Q2.

針對 H 的訓練,我想確認一下我的想法與你的是否有出入。

H = - p*log(p)

當 p = 0.1 => Discriminator 認為相似於 Target domain : H = 中

當 p = 0.9 => Discriminator 認為相似於 Source domain : H = 小

當 p = 0.5 => Discriminator 分辨不出來 :H = 大

  • Local Attention

w = 1-H() 這部分應該是希望 Feature extractor 優先學習與 Source domain 相像的 Feature。

  • Global Attention

w = 1+H() 優先針對無法分辨 Source/Target 的 pixel 做學習。

如同你所說的 Local 以及 Global Attention 的想法是相互矛盾的,

雖說看超參數會認為 Global attention 的重要性較多,

但是 GAN 架構又不能僅憑參數定論,

所以我目前也沒有一個想法,

歡迎交流 哈哈哈哈。

--

--

xiao sean
xiao sean

Written by xiao sean

I am a Ph.D. candidate in Computer Science at the National Taiwan University of Science and Technology.

Responses (1)