Skip to content

Commit

Permalink
Added missing parameters in doc
Browse files Browse the repository at this point in the history
DCO Remediation Commit for bala93 <balamuralim.1993@gmail.com>

I, bala93 <balamuralim.1993@gmail.com>, hereby add my Signed-off-by to this commit: 8fbec82
I, bala93 <balamuralim.1993@gmail.com>, hereby add my Signed-off-by to this commit: 7c121a0
I, bala93 <balamuralim.1993@gmail.com>, hereby add my Signed-off-by to this commit: dccde47

Signed-off-by: bala93 <balamuralim.1993@gmail.com>
  • Loading branch information
Bala93 committed Aug 5, 2024
1 parent bc6b995 commit 51e15fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion monai/losses/nacl_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class NACLLoss(_Loss):
Murugesan, Balamurali, et al.
"Trust your neighbours: Penalty-based constraints for model calibration."
International Conference on Medical Image Computing and Computer-Assisted Intervention, 2023.
International Conference on Medical Image Computing and Computer-Assisted Intervention, MICCAI 2023.
https://arxiv.org/abs/2303.06268
"""

Expand All @@ -191,6 +191,7 @@ def __init__(
"""
Args:
classes: number of classes
dim: dimension of data (supports 2d and 3d)
kernel_size: size of the spatial kernel
distance_type: l1/l2 distance between spatial kernel and predicted logits
alpha: weightage between cross entropy and logit constraint
Expand Down
4 changes: 1 addition & 3 deletions tests/test_nacl_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ class TestNACLLoss(unittest.TestCase):
def test_result(self, input_param, input_data, expected_val):
loss = NACLLoss(**input_param)
result = loss(**input_data)
np.testing.assert_allclose(
result.detach().cpu().numpy(), expected_val, atol=1e-4, rtol=1e-4
)
np.testing.assert_allclose(result.detach().cpu().numpy(), expected_val, atol=1e-4, rtol=1e-4)


if __name__ == "__main__":
Expand Down

0 comments on commit 51e15fe

Please sign in to comment.