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
BasicBlock
module from torchvision’s ResNet implementation: ResNet. TheBasicBlock
module 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_destination
call_super_init
dump_patches
expansion
feature_dims
training
Methods