sandeep-krishnamurthy commented on a change in pull request #12750: [MXNET 
-1030] Cosine Embedding Loss
URL: https://github.com/apache/incubator-mxnet/pull/12750#discussion_r228410529
 
 

 ##########
 File path: python/mxnet/gluon/loss.py
 ##########
 @@ -767,3 +767,71 @@ def hybrid_forward(self, F, pred, target, 
sample_weight=None, epsilon=1e-08):
             loss += stirling_factor
         loss = _apply_weighting(F, loss, self._weight, sample_weight)
         return F.mean(loss)
+
+
+class CosineEmbeddingLoss(Loss):
+    r"""For a target label 1 or -1, vectors target and pred, the function 
computes the cosine distance
+    between the vectors. This can be interpretted as how similar/dissimilar 
two input vectors are.
 
 Review comment:
   nit: interpreted

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to