Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing expected tensor shapes in monotonic regularization loss docstrings #183

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vital/metrics/train/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def monotonic_regularization_loss(input: Tensor, target: Tensor, delta: float) -
(link to the paper: https://arxiv.org/pdf/2004.05485.pdf)

Args:
input: Input values to regularize so that they have a monotonic relationship with the `target` values.
target: Values used to determine the target monotonic ordering of the values.
input: (N, [1]), Input values to regularize so that they have a monotonic relationship with the `target` values.
target: (N, [1]), Values used to determine the target monotonic ordering of the values.
delta: Hyperparameter that decides the spread of the posterior distribution.

Returns:
Expand Down
5 changes: 3 additions & 2 deletions vital/metrics/train/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ def forward(self, input: Tensor, target: Tensor) -> Tensor:
"""Actual metric calculation.

Args:
input: Input values to regularize so that they have a monotonic relationship with the `target` values.
target: Values used to determine the target monotonic ordering of the values.
input: (N, [1]), Input values to regularize so that they have a monotonic relationship with the `target`
values.
target: (N, [1]), Values used to determine the target monotonic ordering of the values.

Returns:
(1,), Calculated monotonic regularization loss.
Expand Down