StridedConvolutionBlock¶
- class maze.perception.blocks.feed_forward.strided_conv.StridedConvolutionBlock(*args: Any, **kwargs: Any)¶
A block containing multiple subsequent strided convolution layers.
One layer consists of a single strided convolution followed by an activation function. The block expects the input tensors to have the from (batch-dim, channel-dim, row-dim, column-dim).
- Parameters:
in_keys – One key identifying the input tensors.
out_keys – One key identifying the output tensors.
in_shapes – List of input shapes.
hidden_channels – List containing the number of hidden channels for hidden layers.
hidden_kernels – List containing the size of the convolving kernels.
non_lin – The non-linearity to apply after each layer.
convolution_dimension – Dimension of the convolution to use [1, 2, 3]
hidden_strides – List containing the strides of the convolutions.
hidden_dilations – List containing the spacing between kernel elements.
hidden_padding – List containing the padding added to both sides of the input
padding_mode – ‘zeros’, ‘reflect’, ‘replicate’ or ‘circular’.
- build_layer_dict() OrderedDict¶
Compiles a block-specific dictionary of network layers. This could be overwritten by derived layers (e.g. to get a ‘BatchNormalizedConvolutionBlock’).
- Returns:
Ordered dictionary of torch modules [str, nn.Module]
- normalized_forward(block_input: Dict[str, torch.Tensor]) Dict[str, torch.Tensor]¶
(overrides
ShapeNormalizationBlock)implementation of
ShapeNormalizationBlockinterface