You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/02 19:53:48 UTC

[GitHub] gaurav-gireesh commented on a change in pull request #12697: [WIP] [MXNET -1004] Poisson NegativeLog Likelihood loss

gaurav-gireesh commented on a change in pull request #12697: [WIP] [MXNET -1004] Poisson NegativeLog Likelihood loss
URL: https://github.com/apache/incubator-mxnet/pull/12697#discussion_r222089775
 
 

 ##########
 File path: tests/python/unittest/test_loss.py
 ##########
 @@ -342,12 +343,45 @@ def test_triplet_loss():
     Loss = gluon.loss.TripletLoss()
     loss = Loss(output, pos, neg)
     loss = mx.sym.make_loss(loss)
-    mod = mx.mod.Module(loss, data_names=('data',), label_names=('pos','neg'))
+    mod = mx.mod.Module(loss, data_names=('data',), label_names=('pos', 'neg'))
     mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.01},
             initializer=mx.init.Xavier(magnitude=2), eval_metric=mx.metric.Loss(),
             optimizer='adam')
     assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
+@with_seed()
+def test_poisson_nllloss():
 
 Review comment:
   @Lai Yes, I have separated the use cases commenting on what exactly is being tested. I have not split into different functions so as to keep consistency with other loss functions tests.
   Thank you for your comment.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services