You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When changing the kernel_size of the attention-unet, amount of trainable parameters stays the same.
Reason: The kernel size will be set to the assigned default value, because the when creating ConvBlocks the Kernelsize is not propagated.
To Reproduce
Steps to reproduce the behavior:
Create a model "Attention Unet" from monai.networks.nets
Additional remarks
This behaviour might occur for other network architectures aswell.
Please review this issue for similar architectures (I have not checked this myself).
The text was updated successfully, but these errors were encountered:
Fixes#7726.
### Description
Passes the `kernel_size` parameter to `ConvBlocks` within Attention
UNet, creating a net with the expected number of parameters.
Using the example in #7726 on this branch:
```
from monai.networks.nets import AttentionUnet
model = AttentionUnet(
spatial_dims = 2,
in_channels = 1,
out_channels = 1,
channels = (2, 4, 8, 16),
strides = (2,2,2),
kernel_size = 5,
up_kernel_size = 5
)
```
outputs the expected values:
```
Total params: 18,846
Trainable params: 18,846
Non-trainable params: 0
Total mult-adds (M): 0.37
```
### 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).
- [ ] New tests added to cover the changes.
- [x] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
---------
Signed-off-by: Peter Kaplinsky <peterkaplinsky@gmail.com>
Co-authored-by: Peter Kaplinsky <peterkaplinsky@gmail.com>
Description
When changing the kernel_size of the attention-unet, amount of trainable parameters stays the same.
Reason: The kernel size will be set to the assigned default value, because the when creating ConvBlocks the Kernelsize is not propagated.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Actual behavior
Environment
Additional remarks
This behaviour might occur for other network architectures aswell.
Please review this issue for similar architectures (I have not checked this myself).
The text was updated successfully, but these errors were encountered: