class maze.perception.blocks.joint_blocks.strided_conv_dense.StridedConvolutionDenseBlock(*args: Any, **kwargs: Any)

A block containing multiple subsequent strided convolutions followed by flattening and a dense layer block.

For details on the convolution part see StridedConvolutionBlock. For details on flattening see FlattenBlock. For details on dense layers see DenseBlock.

  • 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.

  • 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’.

  • hidden_units – List containing the number of hidden units for hidden layers.

  • non_lin – The non-linearity to apply after each layer.

forward(block_input: Dict[str, torch.Tensor]) → Dict[str, torch.Tensor]

(overrides PerceptionBlock)

implementation of ShapeNormalizationBlock interface