回答編集履歴

3

fix context

2023/09/30 05:06

投稿

ps_aux_grep
ps_aux_grep

スコア1581

test CHANGED
@@ -10,4 +10,4 @@
10
10
  Attentionは[Attention Is All You Need](https://arxiv.org/abs/1706.03762)で示されたようなものに限らず,多種多様にわたり独自開発が多く存在します.
11
11
  画像分類処理では[SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning](https://openaccess.thecvf.com/content_cvpr_2017/papers/Chen_SCA-CNN_Spatial_and_CVPR_2017_paper.pdf)で使われるような,Spatial AttentionとChannel-wise Attentionという2種のSelf Attentionが有名です.
12
12
 
13
- 貴コードにある`VideoClassifier`はこれのどちらでもないっぽいですね.
13
+ 貴コードにある`VideoClassifier`は[ChatGPTに聞いたとろ](https://chat.openai.com/share/c40c9c37-0295-4cd1-8b93-34c992f15686)Channel-wise Attentionぽいですね.

2

fix context

2023/09/30 05:02

投稿

ps_aux_grep
ps_aux_grep

スコア1581

test CHANGED
@@ -2,14 +2,12 @@
2
2
  > Self Attention = 多重パーセプトロン
3
3
  > なのでしょうか?
4
4
 
5
- その疑問を持つことは非常正しい感覚です.
5
+ その疑問を持つことはAttentionたる根源を知らないことよるものだと考えます.
6
- そもAttentionとは,入力してきたデータに0~1の値を掛けることで重みづけを行い,1であれば要注視データ,0であれば不要データとして捨てるような処理を意味します.
6
+ そもAttentionとは,入力してきたデータに0~1の値を掛けることで重みづけを行い,1であれば要注視データ,0であれば不要データとして捨てるような処理を意味します.`VideoClassifier`では,`F.softmax()`の出力がこの重みに該当し,これを入力値`x.permute(0,2,1)`に掛けており,Attentionの体を成しています.
7
7
 
8
8
  ここでは,重みづけの処理を[Attention Is All You Need](https://arxiv.org/abs/1706.03762)で示されたようなScaled Dot-Product Attentionに使われる`torch.matmul`を使っておらず,`torch.bmm`が似たような処理を担当しているといった状態です.そも重みを作るための`dot-product`を多重パーセプトロンで代用しているので独自のSelf Attentionだと思ってください.
9
9
 
10
10
  Attentionは[Attention Is All You Need](https://arxiv.org/abs/1706.03762)で示されたようなものに限らず,多種多様にわたり独自開発が多く存在します.
11
- 画像分類処理では次のようなattentionも存在します.
12
-
13
- [SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning](https://openaccess.thecvf.com/content_cvpr_2017/papers/Chen_SCA-CNN_Spatial_and_CVPR_2017_paper.pdf)では,Spatial AttentionとChannel-wise Attentionという2種のSelf Attentionを使っています.
11
+ 画像分類処理では[SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning](https://openaccess.thecvf.com/content_cvpr_2017/papers/Chen_SCA-CNN_Spatial_and_CVPR_2017_paper.pdf)で使われるような,Spatial AttentionとChannel-wise Attentionという2種のSelf Attentionが有名です.
14
12
 
15
13
  貴コードにある`VideoClassifier`はこれのどちらでもないっぽいですね.

1

fix context

2023/09/30 03:00

投稿

ps_aux_grep
ps_aux_grep

スコア1581

test CHANGED
@@ -7,4 +7,9 @@
7
7
 
8
8
  ここでは,重みづけの処理を[Attention Is All You Need](https://arxiv.org/abs/1706.03762)で示されたようなScaled Dot-Product Attentionに使われる`torch.matmul`を使っておらず,`torch.bmm`が似たような処理を担当しているといった状態です.そも重みを作るための`dot-product`を多重パーセプトロンで代用しているので独自のSelf Attentionだと思ってください.
9
9
 
10
+ Attentionは[Attention Is All You Need](https://arxiv.org/abs/1706.03762)で示されたようなものに限らず,多種多様にわたり独自開発が多く存在します.
11
+ 画像分類処理では次のようなattentionも存在します.
10
12
 
13
+ [SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning](https://openaccess.thecvf.com/content_cvpr_2017/papers/Chen_SCA-CNN_Spatial_and_CVPR_2017_paper.pdf)では,Spatial AttentionとChannel-wise Attentionという2種のSelf Attentionを使っています.
14
+
15
+ 貴コードにある`VideoClassifier`はこれのどちらでもないっぽいですね.