nip.utils.torch.ResNetBottleneckBlockSimulateBatchDims#
- class nip.utils.torch.ResNetBottleneckBlockSimulateBatchDims(inplanes: int, planes: int, stride: int = 1, downsample: Module | None = None, groups: int = 1, base_width: int = 64, dilation: int = 1, norm_layer: Callable[[...], Module] | None = None)[source]#
ResNet bottleneck block with arbitrary batch dimensions.
This is a subclass of the
Bottleneckmodule from torchvision’s ResNet implementation: ResNet. TheBottleneckmodule is not documented, but you can see the source code here.Assumes an input of shape (… channels height width).
Methods Summary
forward(x)Apply the module to the input tensor, simulating multiple batch dimensions.
Attributes
T_destinationcall_super_initdump_patchesexpansionfeature_dimstrainingMethods