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
Describe the bug
The Quicknat class, layers, and tests were introduced in #6306. These rely on the package squeeze_and_excitation which doesn't exist on PyPI so was never installed. The test that is conditioned on it being installed never runs so this hasn't been noticed. Squeeze-and-excitation layers are present in PyTorch now so these types and the associated tests should be updated.
Hi @ericspod, I'd like to take this one if nobody is on it yet.
PyTorch and torchvision only ship a channel squeeze-and-excitation layer, and MONAI already has that as ChannelSELayer. The missing pieces are the spatial (sSE) and concurrent (scSE) variants from Roy et al. 2018, which is what Quicknat imports from squeeze_and_excitation. My plan:
add SpatialSELayer and ChannelSpatialSELayer to monai/networks/blocks/squeeze_and_excitation.py, supporting 1D/2D/3D and following the original definitions (sSE: 1x1 conv to one channel + sigmoid; scSE: element-wise max of cSE and sSE);
use them in Quicknat.get_selayer and remove the optional_import;
drop the skipUnless in test_quicknat.py so the CSE/SSE/CSSE cases actually run, and add unit tests for the new blocks.
Does that approach work for you, or would you prefer a different direction?
Activity
ericspod commentedon Nov 12, 2026
CC @vgonzalezd @KumoLiu this was noticed recently in work for #9112.
BakaryGibba commentedon Nov 13, 2026
Hi @ericspod, I'd like to take this one if nobody is on it yet.
PyTorch and torchvision only ship a channel squeeze-and-excitation layer, and MONAI already has that as
ChannelSELayer. The missing pieces are the spatial (sSE) and concurrent (scSE) variants from Roy et al. 2018, which is what Quicknat imports fromsqueeze_and_excitation. My plan:SpatialSELayerandChannelSpatialSELayertomonai/networks/blocks/squeeze_and_excitation.py, supporting 1D/2D/3D and following the original definitions (sSE: 1x1 conv to one channel + sigmoid; scSE: element-wise max of cSE and sSE);Quicknat.get_selayerand remove theoptional_import;skipUnlessintest_quicknat.pyso the CSE/SSE/CSSE cases actually run, and add unit tests for the new blocks.Does that approach work for you, or would you prefer a different direction?
ericspod commentedon Nov 13, 2026
Thanks @BakaryGibba, please do go ahead with this one, I think your approach sounds good but we can always review and adjust in the PR.