看板 DataScience 關於我們 聯絡資訊
由於自己是剛開始學習,所以會上 Kaggle 看一下人家分享的 Kernel 來試著跟著做看看 最近在看的是 Humpback Whale Identification 裡面大多數都用 SNN 作為模型, 並且都以 http://bit.ly/2y0F1o7 為 pre-training model 下去做修正 這個 model 我看了很久,但在 head model 的部分有點困惑 ( 基本上看不太懂他寫什麼@@ ) 作者認為原始 SNN 利用距離來計算 Loss 有幾個問題 : 1. A distance measure will consider two features with value zero as a perfect match, while two features with large but slightly different values will be seen as good, but not quite as good since they are not exactly equal. Still, I feel there is more postive signal in the active features than in the negative ones, especially with ReLU (Rectified Linear Unit) activation, concept that is lost by the distance measure. 2. Also, a distance measure does not provide for features to be negatively correlated. Consider a case where, if both images have feature X, they must be the same whale, unless they also both have feature Y, in which case X is not as clear. 3. At the same time, there is this implicit assumption that swapping the two images must produce the same result: if A is the same whale as B, B must be the same whale as A. 基於以上三點理由,作者將 兩個 branch model 輸出的特徵向量x,y 變成四個向量 x+y,|x-y|,xy,(x-y)^2 然後再通過兩個 卷積層 作者宣稱 這樣可以 learn how to weigh between matching zeros and close non-zero values ========= 我大概有幾個問題 : 1. 原本以距離作為 loss 的方式,作者認為會有問題的其中第一跟第二項是什麼意思? 2. 為什麼要將兩個 output vectors 做運算形成四個 vectors ? 又為什麼這樣可以解決上述三個問題 ? 想請大家指點一下,在此先感謝大家~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.171.69.123 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/DataScience/M.1563818507.A.207.html
sxy67230: 作者在comments 有舉例子,你可以看一下,他舉例同一個 07/23 16:10
sxy67230: 人鼻子長疹子跟沒有算不算同一人,但是我覺得這個距離計 07/23 16:10
sxy67230: 算的公式也不是絕對的。 07/23 16:10
sxy67230: 簡單來說作者就是把他四個的距離公式去攤開,在做reshap 07/23 16:14
sxy67230: e後,抽出主要的距離特徵,這樣確實是有辦法對次要特徵 07/23 16:14
sxy67230: 做懲罰。 07/23 16:14