diff --git a/monai/networks/layers/weight_init.py b/monai/networks/layers/weight_init.py index 9b81ef17f8..b0c6fae2c2 100644 --- a/monai/networks/layers/weight_init.py +++ b/monai/networks/layers/weight_init.py @@ -55,7 +55,7 @@ def trunc_normal_(tensor, mean=0.0, std=1.0, a=-2.0, b=2.0): b: the maximum cutoff value """ - if not std > 0: + if std <= 0: raise ValueError("the standard deviation should be greater than zero.") if a >= b: