You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we differentiate, loss function with respect to x_a,x_p,x_n, then, the gradients should be:
(If we are assuming embedding of an image as unit normalized)
bottom[0].diff[i] = self.a*((x_n - x_p)/((bottom[0]).num))
bottom[1].diff[i] = self.a*((x_p - x_a)/((bottom[0]).num))
bottom[2].diff[i] = self.a*((x_a - x_n)/((bottom[0]).num))
If we differentiate, loss function with respect to x_a,x_p,x_n, then, the gradients should be:
(If we are assuming embedding of an image as unit normalized)
bottom[0].diff[i] = self.a*((x_n - x_p)/((bottom[0]).num))
bottom[1].diff[i] = self.a*((- x_a)/((bottom[0]).num))
bottom[2].diff[i] = self.a*((x_a)/((bottom[0]).num))
Please correct me, if I am wrong...
The text was updated successfully, but these errors were encountered: