Skip to content

Commit

Permalink
[Major] SmoothL1Loss update beta from 1.0 to 0.3 (#1461)
Browse files Browse the repository at this point in the history
* replace false mentions of Huber loss

* set SmoothL1Loss beta to 0.1

* increase beta to 0.3

* reset beta to 1.0

* set beta to 0.3
  • Loading branch information
ourownstory authored Nov 6, 2023
1 parent 4b8ccdb commit 07724b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neuralprophet/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def set_loss_func(self):
if isinstance(self.loss_func, str):
if self.loss_func.lower() in ["smoothl1", "smoothl1loss", "huber"]:
# keeping 'huber' for backwards compatiblility, though not identical
self.loss_func = torch.nn.SmoothL1Loss(reduction="none", beta=1.0)
self.loss_func = torch.nn.SmoothL1Loss(reduction="none", beta=0.3)
elif self.loss_func.lower() in ["mae", "maeloss", "l1", "l1loss"]:
self.loss_func = torch.nn.L1Loss(reduction="none")
elif self.loss_func.lower() in ["mse", "mseloss", "l2", "l2loss"]:
Expand Down

0 comments on commit 07724b1

Please sign in to comment.