diff --git a/monai/networks/blocks/dynunet_block.py b/monai/networks/blocks/dynunet_block.py index bb654d841c..e637b53212 100644 --- a/monai/networks/blocks/dynunet_block.py +++ b/monai/networks/blocks/dynunet_block.py @@ -32,7 +32,9 @@ class UnetResBlock(nn.Module): out_channels: number of output channels. kernel_size: convolution kernel size. stride: convolution stride. - norm_name: feature normalization type and arguments. + norm_name: feature normalization type and arguments. If you need to use `"group"` or `"instance"` and want to + maintain the consistency with previous version v0.5.3, please set `affine=True`. For example: + `norm_name=("instance", {"affine": True})`. """ @@ -106,7 +108,9 @@ class UnetBasicBlock(nn.Module): out_channels: number of output channels. kernel_size: convolution kernel size. stride: convolution stride. - norm_name: feature normalization type and arguments. + norm_name: feature normalization type and arguments. If you need to use `"group"` or `"instance"` and want to + maintain the consistency with previous version v0.5.3, please set `affine=True`. For example: + `norm_name=("instance", {"affine": True})`. """ @@ -163,7 +167,9 @@ class UnetUpBlock(nn.Module): kernel_size: convolution kernel size. stride: convolution stride. upsample_kernel_size: convolution kernel size for transposed convolution layers. - norm_name: feature normalization type and arguments. + norm_name: feature normalization type and arguments. If you need to use `"group"` or `"instance"` and want to + maintain the consistency with previous version v0.5.3, please set `affine=True`. For example: + `norm_name=("instance", {"affine": True})`. """ diff --git a/monai/networks/nets/dynunet.py b/monai/networks/nets/dynunet.py index 4af70b22c7..e9bf03a64c 100644 --- a/monai/networks/nets/dynunet.py +++ b/monai/networks/nets/dynunet.py @@ -86,7 +86,7 @@ class DynUNet(nn.Module): strides: convolution strides for each blocks. upsample_kernel_size: convolution kernel size for transposed convolution layers. The values should equal to strides[1:]. - norm_name: feature normalization type and arguments. Defaults to ``INSTANCE``. + norm_name: feature normalization type and arguments. Defaults to ``("INSTANCE", {"affine": True})``. deep_supervision: whether to add deep supervision head before output. Defaults to ``False``. If ``True``, in training mode, the forward function will output not only the last feature map, but also the previous feature maps that come from the intermediate up sample layers.