Residual block class#

class src.model.ArtificialBlock.ResConv2dBlock(input_dim: int, output_dim: int, input_channels: int, output_channels: int, kernel_size: Tuple[int, int], stride: Tuple[int, int], padding: Tuple[int, int], dilation: Tuple[int, int], bias: bool, activation_fn: str | None, weight_init: dict, scale_flag: bool, scale_factor: float, bn_flag: bool, dropout_flag: bool, dropout_p: float, residual_skip_connection_type: str, device, dtype: dtype, layer_index: int)#

Bases: Module

Class that implements the ANN layer.

forward(x: Tensor)#

Method that defines the performed computation during the forward pass.

init_weights(weight_init: dict)#

Method that handles the convolution parameters' initialization.

Parameters:

weight_init (dict) -- Initialization specifications' dictionary.

res_skip_connection(output_records, identity)#
training: bool#