BasicBlock#
- class ctlearn.core.BasicBlock(in_channels, out_channels, stride=1, conv_shortcut=True, attention=None, conv_layer=<class 'torch.nn.modules.conv.Conv2d'>)[source]#
Bases:
ModuleBasic block for ResNet architectures.
Methods Summary
forward(x)Perform the forward pass of the neural network.
setup_attention(channels)Initialize and configure the attention mechanism for the block.
Methods Documentation