roywei commented on a change in pull request #12750: [MXNET -1030] Cosine
Embedding Loss
URL: https://github.com/apache/incubator-mxnet/pull/12750#discussion_r224232796
##########
File path: tests/python/unittest/test_loss.py
##########
@@ -348,7 +348,35 @@ def test_triplet_loss():
optimizer='adam')
assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
-
+@with_seed()
+def test_cosine_loss():
+ #For similarity check
+ label = mx.nd.array([1])
+ pred = mx.nd.array([[1, 1, 1, 1],
Review comment:
Please also rename params in test to input1, input2, label to avoid confusion
----------------------------------------------------------------
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