nip.utils.torch.ResNetBasicBlockSimulateBatchDims#
- class nip.utils.torch.ResNetBasicBlockSimulateBatchDims(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 basic block with arbitrary batch dimensions.
This is a subclass of the
BasicBlockmodule from torchvision’s ResNet implementation: ResNet. TheBasicBlockmodule 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