Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions monai/networks/nets/dynunet.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ class DynUNet(nn.Module):
is no less than 3 in order to have at least one downsample and upsample blocks.

To meet the requirements of the structure, the input size for each spatial dimension should be divisible
by `2 * the product of all strides in the corresponding dimension`. The output size for each spatial dimension
equals to the input size of the corresponding dimension divided by the stride in strides[0].
For example, if `strides=((1, 2, 4), 2, 1, 1)`, the minimal spatial size of the input is `(8, 16, 32)`, and
the spatial size of the output is `(8, 8, 8)`.
by the product of all strides in the corresponding dimension. In addition, the minimal spatial size should have
at least one dimension that has twice the size of the product of all strides.
For example, if `strides=((1, 2, 4), 2, 2, 1)`, the spatial size should be divisible by `(4, 8, 16)`,
and the minimal spatial size is `(8, 8, 16)` or `(4, 16, 16)` or `(4, 8, 32)`.

The output size for each spatial dimension equals to the input size of the corresponding dimension divided by the
stride in strides[0].
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)`.

For backwards compatibility with old weights, please set `strict=False` when calling `load_state_dict`.

Expand Down