我想用咖啡來實現Schroff, Kalenichenko and Philbin "FaceNet: A Unified Embedding for Face Recognition and Clustering", 2015中描述的三重損失。什麼是三重損失後向傳播梯度公式?
我是新來的,所以如何計算反向傳播的梯度?
我想用咖啡來實現Schroff, Kalenichenko and Philbin "FaceNet: A Unified Embedding for Face Recognition and Clustering", 2015中描述的三重損失。什麼是三重損失後向傳播梯度公式?
我是新來的,所以如何計算反向傳播的梯度?
我假設你定義損失層
layer {
name: "tripletLoss"
type: "TripletLoss"
bottom: "anchor"
bottom: "positive"
bottom: "negative"
...
}
梯度WRT 「正」 輸入(fp
):
原來的計算(我離開這裏了感情上的原因......)
請參閱comment修正的最後一項。
我看到有一個開放的公關實現這個損失:https://github.com/BVLC/caffe/pull/3663 – Shai