diff --git a/monai/losses/nacl_loss.py b/monai/losses/nacl_loss.py index f96e85464c..b5ffcd66cd 100644 --- a/monai/losses/nacl_loss.py +++ b/monai/losses/nacl_loss.py @@ -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 """ @@ -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 diff --git a/tests/test_nacl_loss.py b/tests/test_nacl_loss.py index f0853269f9..608da95301 100644 --- a/tests/test_nacl_loss.py +++ b/tests/test_nacl_loss.py @@ -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__":