Why is the divisible pad part of the transforms, not the model (e.g. Unet)? #6705
john-zielke-snkeos
started this conversation in
General
Replies: 1 comment
-
Hi @john-zielke-snkeos, thank you for sharing your opinions. As you described, it is possible to ensure the size that is divisible by a factor of 2**network_depth directly in the model, such as
Considering the generalizability of the MONAI framework, I think using a separate resizing process is more appropriate for MONAI's implementation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I am using a Unet or similar architecture, I need my inputs to be divisible by 2**network_depth. In order to ensure this, the current suggested solution seems to be to use monai.transforms.DivisiblePad. I was wondering if there is any reason not to implement this step directly in the model by:
This seems to me like a better separation of concerns, since the padding seems like something specific to the model, not the data pipeline.
I would be happy to hear your opinions on why this might be a good or bad idea.
PS: To clarify, I am not trying to suggest we should change this everywhere, just wanted to know why this problem was solved this way and if the padding inside the model could lead to potential problems.
Beta Was this translation helpful? Give feedback.
All reactions