nntoolbox.vision.components.se module¶
-
class
nntoolbox.vision.components.se.
SEBlock
(in_channels, reduction_ratio=16)[source]¶ Bases:
torch.nn.modules.module.Module
Implement squeeze (global information embedding) and excitation (adaptive recalibration) mechanism:
- References:
Jie Hu, Li Shen, Samuel Albanie, Gang Sun, Enhua Wu. “Squeeze-and-Excitation Networks.” https://arxiv.org/pdf/1709.01507.pdf
-
forward
(input)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
class
nntoolbox.vision.components.se.
SEResidualBlock
(in_channels, reduction_ratio=16)[source]¶ Bases:
torch.nn.modules.container.Sequential
-
training
: bool¶
-
-
class
nntoolbox.vision.components.se.
SEResidualBlockPreActivation
(in_channels, reduction_ratio=16, activation=<class 'torch.nn.modules.activation.ReLU'>, normalization=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>)[source]¶ Bases:
nntoolbox.vision.components.res.ResNeXtBlock
-
training
: bool¶
-
-
class
nntoolbox.vision.components.se.
SEResidualBlockPreActivationKer
(in_channels, kernel, reduction_ratio=16, activation=<class 'torch.nn.modules.activation.ReLU'>, normalization=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>)[source]¶ Bases:
nntoolbox.vision.components.res.ResNeXtBlock
-
training
: bool¶
-