From 4a081755d7e3e4b245e85a8a56868a87b94b520a Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Thu, 14 Oct 2021 10:54:50 +0200
Subject: [PATCH] Test effect of loss clamp.

---
 climax/core/loss.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/climax/core/loss.py b/climax/core/loss.py
index 236c2c0..c2cc811 100644
--- a/climax/core/loss.py
+++ b/climax/core/loss.py
@@ -139,8 +139,7 @@ class BernoulliWeibullLoss(BernoulliLoss):
         # clip shape to (0, 10)
         # NOTE: in general shape in (0, +infinity), clipping is required for
         #       numerical stability
-        shape = torch.clamp(
-            torch.exp(y_pred[:, 1, ...].squeeze()[mask][~mask_p]), max=10)
+        shape = torch.exp(y_pred[:, 1, ...].squeeze()[mask][~mask_p])
 
         # negative log-likelihood function of Bernoulli-Weibull distribution
         loss = torch.zeros_like(y_true)
-- 
GitLab