peal.generators.deeplift_resnet.DeepLiftBottleneck¶
- class peal.generators.deeplift_resnet.DeepLiftBottleneck[source]¶
Bases:
ModuleBottleneck with separate ReLU instances for DeepLift compatibility
Methods
Residual forward pass with a distinct ReLU after each stage.
Attributes
- expansion = 4¶
- __init__(inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm_layer=None)[source]¶
Build the 1x1 -> 3x3 -> 1x1 convolutions of a bottleneck block.
- Parameters:
inplanes (
int) – Input channels.planes (
int) – Bottleneck width before theexpansionfactor (output hasplanes * 4channels).stride (
int) – Stride of the 3x3 convolution.downsample (
nn.ModuleorNone) – Projection applied to the identity path when shapes differ.groups (
int) – Groups of the 3x3 convolution.base_width (
int) – Scales the inner width asplanes * base_width / 64.dilation (
int) – Dilation (and padding) of the 3x3 convolution.norm_layer (
callableorNone) – Normalisation layer factory,nn.BatchNorm2dby default.