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

 ##########
 File path: python/mxnet/gluon/loss.py
 ##########
 @@ -706,3 +707,65 @@ def hybrid_forward(self, F, pred, positive, negative):
                      axis=self._batch_axis, exclude=True)
         loss = F.relu(loss + self._margin)
         return _apply_weighting(F, loss, self._weight, None)
+
+
+class PoissonNLLLoss(Loss):
+    r"""For a target (Random Variable) in a Poisson distribution, the function 
calculates the Negative
+    Log likelihood loss.
+    PoissonNLLLoss measures the loss accrued from a poisson regression 
prediction made by the model.
+
+    .. math::
+        L = \text{pred} - \text{target} * \log(\text{pred}) 
+\log(\text{target!})
 
 Review comment:
   nit: why ! after \text{target!}
   
   Also do you have any reference for the definition of this loss function

----------------------------------------------------------------
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