From d5518bd015155cc9f5e21ec9baa057e9dff6b87f Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Fri, 15 Oct 2021 14:31:42 +0200 Subject: [PATCH] Changed computation of Weibull NLL. --- climax/core/loss.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/climax/core/loss.py b/climax/core/loss.py index c747989..9a6e99f 100644 --- a/climax/core/loss.py +++ b/climax/core/loss.py @@ -155,10 +155,9 @@ class BernoulliWeibullLoss(BernoulliLoss): # torch.pow(y_weib / (scale + self.epsilon), shape) # ) loss_weib = (torch.log(p_pred[~mask_p] + self.epsilon) + - torch.log(shape / (scale + self.epsilon)) - - (shape - 1) * torch.log(y_weib / (scale + self.epsilon)) - - torch.pow(y_weib / (scale + self.epsilon), shape) - ) + torch.log(shape / scale) - + (shape - 1) * torch.log(y_weib / scale) - + torch.pow(y_weib / scale, shape)) # fill loss array loss[torch.where(mask_p)] = - loss_bern -- GitLab