peal.generators.deeplift_resnet.DeepLiftBasicBlock¶
- class peal.generators.deeplift_resnet.DeepLiftBasicBlock[source]¶
Bases:
ModuleBasicBlock with separate ReLU instances for DeepLift compatibility
Methods
Residual forward pass with a distinct ReLU after each stage.
Attributes
- expansion = 1¶
- __init__(inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm_layer=None)[source]¶
Build the two 3x3 conv layers of a basic residual block.
- Parameters:
inplanes (
int) – Input channels.planes (
int) – Output channels of both convolutions.stride (
int) – Stride of the first convolution.downsample (
nn.ModuleorNone) – Projection applied to the identity path when shapes differ.groups (
int) – Must stay at1/64; other values raiseValueError.base_width (
int) – Must stay at1/64; other values raiseValueError.dilation (
int) – Must be1; larger values raiseNotImplementedError.norm_layer (
callableorNone) – Normalisation layer factory,nn.BatchNorm2dby default.