From 892ff7ee5ef4e5a3d3e70b58e267a0bb1aaf9936 Mon Sep 17 00:00:00 2001 From: Yiheng Wang Date: Wed, 26 Jan 2022 17:42:19 +0800 Subject: [PATCH 1/2] add non-determinism tips Signed-off-by: Yiheng Wang --- monai/networks/nets/densenet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monai/networks/nets/densenet.py b/monai/networks/nets/densenet.py index 8fb2c269ab..164579ab1f 100644 --- a/monai/networks/nets/densenet.py +++ b/monai/networks/nets/densenet.py @@ -148,6 +148,9 @@ class DenseNet(nn.Module): """ Densenet based on: `Densely Connected Convolutional Networks `_. Adapted from PyTorch Hub 2D version: https://pytorch.org/vision/stable/models.html#id16. + This network is non-determistic When `in_channels` is 3 and CUDA is enabled. Please check the link below + for more details: + https://pytorch.org/docs/stable/generated/torch.use_deterministic_algorithms.html#torch.use_deterministic_algorithms Args: spatial_dims: number of spatial dimensions of the input image. From 1633d6d7bcc03235538134d74dba6de3771eae20 Mon Sep 17 00:00:00 2001 From: Yiheng Wang Date: Wed, 26 Jan 2022 17:48:23 +0800 Subject: [PATCH 2/2] fix the name error Signed-off-by: Yiheng Wang --- monai/networks/nets/densenet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monai/networks/nets/densenet.py b/monai/networks/nets/densenet.py index 164579ab1f..52bd2fa994 100644 --- a/monai/networks/nets/densenet.py +++ b/monai/networks/nets/densenet.py @@ -148,7 +148,7 @@ class DenseNet(nn.Module): """ Densenet based on: `Densely Connected Convolutional Networks `_. Adapted from PyTorch Hub 2D version: https://pytorch.org/vision/stable/models.html#id16. - This network is non-determistic When `in_channels` is 3 and CUDA is enabled. Please check the link below + This network is non-determistic When `spatial_dims` is 3 and CUDA is enabled. Please check the link below for more details: https://pytorch.org/docs/stable/generated/torch.use_deterministic_algorithms.html#torch.use_deterministic_algorithms