Skip to content

Commit

Permalink
docstring to init poission
Browse files Browse the repository at this point in the history
  • Loading branch information
nkempynck committed Nov 18, 2024
1 parent 9610701 commit 96a20db
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/crested/tl/losses/_poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ def __init__(
reduction: str = "sum_over_batch_size",
name: str = "PoissonLoss"
):
"""
Initialize the PoissonLoss class.
Parameters
----------
log_transform : bool, optional
Whether to apply a log(x + 1) transformation to the inputs. Default is True.
eps : float, optional
A small epsilon value to avoid log(0). Default is 1e-7.
reduction : str, optional
The type of reduction to apply to the loss, e.g., "sum_over_batch_size".
Default is "sum_over_batch_size".
name : str, optional
Name of the loss function. Default is "PoissonLoss".
"""
super().__init__(name=name, reduction=reduction)
self.log_transform = log_transform
self.eps = eps
Expand Down

0 comments on commit 96a20db

Please sign in to comment.