nntoolbox.vision.components.shunting module

class nntoolbox.vision.components.shunting.SiConv2D(in_channels, out_channels, kernel_size, stride: int = 1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', num_activation: torch.nn.modules.module.Module = Identity(), denom_activation: torch.nn.modules.module.Module = ReLU(), bound_denom: bool = True, bound: float = 0.1)[source]

Bases: nntoolbox.components.shunting.GeneralizedShuntingModule

Implement a shunting inhibition convolution layer. Right now only support channelwise fully connected variant.

Difference from original implementation: clamping denominator.

References:

Fok Hing Chi Tivive and Abdesselam Bouzerdoum. “Efficient Training Algorithms for a Class of Shunting Inhibitory Convolutional Neural Networks.” https://ieeexplore.ieee.org/document/1427760

training: bool