MultiscaleConvBlock¶

class MultiscaleConvBlock(num_input_channels, kernel_sizes, dilation_rates, num_output_channels=32, strides=(1, 1), activation='relu', *, use_bias=False)[source]¶

Define Multiscale convolution block.

Parameters:
  • num_input_channels (int) – Number of channels in input.

  • num_output_channels (int) – Number of channels in output.

  • kernel_sizes (list) – Size of the kernel in each convolution layer.

  • strides (int) – Size of stride in the convolution layer.

  • use_bias (bool) – Whether to use bias in the convolution layer.

  • dilation_rates (list) – Dilation rate for each convolution layer.

  • activation (str) – Name of the activation function to use.

Returns:

A PyTorch model.

Return type:

torch.nn.Module

Initialize MultiscaleConvBlock.

Methods

forward

Logic for using layers defined in MultiscaleConvBlock init.

Attributes

training

forward(input_map)[source]¶

Logic for using layers defined in MultiscaleConvBlock init.

This method defines how layers are used in forward operation.

Parameters:
Returns:

The inference output.

Return type:

output (torch.Tensor)