Skip to content

Commit af6560a

Browse files
4073 Enhance DynUNet doc-strings (#4102)
* Fix doc strings error Signed-off-by: Yiheng Wang <[email protected]> * remove duplicate places Signed-off-by: Yiheng Wang <[email protected]>
1 parent 6602303 commit af6560a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

monai/networks/nets/dynunet.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,14 @@ class DynUNet(nn.Module):
7474
is no less than 3 in order to have at least one downsample and upsample blocks.
7575
7676
To meet the requirements of the structure, the input size for each spatial dimension should be divisible
77-
by `2 * the product of all strides in the corresponding dimension`. The output size for each spatial dimension
78-
equals to the input size of the corresponding dimension divided by the stride in strides[0].
79-
For example, if `strides=((1, 2, 4), 2, 1, 1)`, the minimal spatial size of the input is `(8, 16, 32)`, and
80-
the spatial size of the output is `(8, 8, 8)`.
77+
by the product of all strides in the corresponding dimension. In addition, the minimal spatial size should have
78+
at least one dimension that has twice the size of the product of all strides.
79+
For example, if `strides=((1, 2, 4), 2, 2, 1)`, the spatial size should be divisible by `(4, 8, 16)`,
80+
and the minimal spatial size is `(8, 8, 16)` or `(4, 16, 16)` or `(4, 8, 32)`.
81+
82+
The output size for each spatial dimension equals to the input size of the corresponding dimension divided by the
83+
stride in strides[0].
84+
For example, if `strides=((1, 2, 4), 2, 2, 1)` and the input size is `(64, 32, 32)`, the output size is `(64, 16, 8)`.
8185
8286
For backwards compatibility with old weights, please set `strict=False` when calling `load_state_dict`.
8387

0 commit comments

Comments
 (0)