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:
Initialize
MultiscaleConvBlock
.Methods
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:
input_map (torch.Tensor) – Input, the tensor is of the shape NCHW.
self (MultiscaleConvBlock)
- Returns:
The inference output.
- Return type:
output (torch.Tensor)