UpSample optional kernel_size for deconv mode#5221
UpSample optional kernel_size for deconv mode#5221wyli merged 8 commits intoProject-MONAI:devfrom myron:upsample
Conversation
Signed-off-by: myron <[email protected]>
|
Hi @myron, you can set up padding and output_padding separately like this, which might solve the test error of mismatched test output sizes. Thanks! |
|
ok, I believe I fixed that, and added another unit test. thanks you |
Signed-off-by: myron <[email protected]>
Signed-off-by: myron <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
wyli
left a comment
There was a problem hiding this comment.
looks good to me, just to note that when the kernel size is not divisible by the scale_factor, this will introduce some checkerboard artefacts.
|
/build |
Signed-off-by: Wenqi Li <[email protected]>
|
/build |
Thanks. is it a known fact? I use it with scale 2, kernel 3, I don't observe any artifacts. |
|
the idea is presented here https://distill.pub/2016/deconv-checkerboard/, I guess it'll be less noticeable for segmentation tasks.. |
### Description Adds (optional) kernel_size parameter to UpSample, used for deconv (convolution transpose up-sampling). This allows to upsample, e.g to upscale to 2x with a kernel_size 3. (currently the default is to upscale to 2x with a kernel size 2) if this parameter is not set, the behavior is the same as before ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <[email protected]>
### Description Adds (optional) kernel_size parameter to UpSample, used for deconv (convolution transpose up-sampling). This allows to upsample, e.g to upscale to 2x with a kernel_size 3. (currently the default is to upscale to 2x with a kernel size 2) if this parameter is not set, the behavior is the same as before ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <[email protected]> Signed-off-by: KumoLiu <[email protected]>
Description
Adds (optional) kernel_size parameter to UpSample, used for deconv (convolution transpose up-sampling).
This allows to upsample, e.g to upscale to 2x with a kernel_size 3. (currently the default is to upscale to 2x with a kernel size 2)
if this parameter is not set, the behavior is the same as before
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.