File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ class LossLayer : public Layer<Dtype> {
128
128
/* *
129
129
* @brief Computes the contrastive loss @f$
130
130
* E = \frac{1}{2N} \sum\limits_{n=1}^N \left(y\right) d +
131
- * \left(1-y\right) \max \left(margin-d, 0\right)
131
+ * \left(1-y\right) \max \left(margin-d, 0\right)^2
132
132
* @f$ where @f$
133
- * d = \left| \left| a_n - b_n \right| \right|_2^2 @f$. This can be
133
+ * d = \left| \left| a_n - b_n \right| \right|_2 @f$. This can be
134
134
* used to train siamese networks.
135
135
*
136
136
* @param bottom input Blob vector (length 3)
@@ -144,9 +144,9 @@ class LossLayer : public Layer<Dtype> {
144
144
* -# @f$ (1 \times 1 \times 1 \times 1) @f$
145
145
* the computed contrastive loss: @f$ E =
146
146
* \frac{1}{2N} \sum\limits_{n=1}^N \left(y\right) d +
147
- * \left(1-y\right) \max \left(margin-d, 0\right)
147
+ * \left(1-y\right) \max \left(margin-d, 0\right)^2
148
148
* @f$ where @f$
149
- * d = \left| \left| a_n - b_n \right| \right|_2^2 @f$.
149
+ * d = \left| \left| a_n - b_n \right| \right|_2 @f$.
150
150
* This can be used to train siamese networks.
151
151
*/
152
152
template <typename Dtype>
You can’t perform that action at this time.
0 commit comments