class_docstr: 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).
  
  :param in_keys: One key identifying the input tensors.
  :param out_keys: One key identifying the output tensors.
  :param in_shapes: List of input shapes.
  :param hidden_channels: List containing the number of hidden channels for hidden layers.
  :param hidden_kernels: List containing the size of the convolving kernels.
  :param non_lin: The non-linearity to apply after each layer.
  :param convolution_dimension: Dimension of the convolution to use [1, 2, 3]
  :param hidden_strides: List containing the strides of the convolutions.
  :param hidden_dilations: List containing the spacing between kernel elements.
  :param hidden_padding: List containing the padding added to both sides of the input
  :param padding_mode: 'zeros', 'reflect', 'replicate' or 'circular'.
class_docstr_tok: ["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",")",".",":","param","in_keys",":","One","key","identifying","the","input","tensors",".",":","param","out_keys",":","One","key","identifying","the","output","tensors",".",":","param","in_shapes",":","List","of","input","shapes",".",":","param","hidden_channels",":","List","containing","the","number","of","hidden","channels","for","hidden","layers",".",":","param","hidden_kernels",":","List","containing","the","size","of","the","convolving","kernels",".",":","param","non_lin",":","The","non-linearity","to","apply","after","each","layer",".",":","param","convolution_dimension",":","Dimension","of","the","convolution","to","use","[","1",",","2",",","3","]",":","param","hidden_strides",":","List","containing","the","strides","of","the","convolutions",".",":","param","hidden_dilations",":","List","containing","the","spacing","between","kernel","elements",".",":","param","hidden_padding",":","List","containing","the","padding","added","to","both","sides","of","the","input",":","param","padding_mode",":","'zeros","'",",","'reflect","'",",","'replicate","'","or","'circular","'","."]
docstr: Compiles a block-specific dictionary of network layers.
  This could be overwritten by derived layers
  (e.g. to get a 'BatchNormalizedConvolutionBlock').
  
  :return: Ordered dictionary of torch modules [str, nn.Module]
docstr_tok: ["Compiles","a","block-specific","dictionary","of","network","layers",".","This","could","be","overwritten","by","derived","layers","(","e.g",".","to","get","a","'BatchNormalizedConvolutionBlock","'",")",".",":","return",":","Ordered","dictionary","of","torch","modules","[","str",",","nn.Module","]"]
code: def build_layer_dict(self) -> OrderedDict:
      """Compiles a block-specific dictionary of network layers.
      This could be overwritten by derived layers
      (e.g. to get a 'BatchNormalizedConvolutionBlock').
  
      :return: Ordered dictionary of torch modules [str, nn.Module]
      """
      layer_dict = OrderedDict()
  
      # treat first layer
      layer_dict["conv_0"] = self.convolution_nn(
          in_channels=self.input_channels,
          out_channels=self.hidden_channels[0],
          kernel_size=self.hidden_kernels[0],
          stride=self.hidden_strides[0],
          padding=self.hidden_padding[0],
          dilation=self.hidden_dilations[0],
          padding_mode=self.padding_mode,
      )
      layer_dict[f"{self.non_lin.__name__}_0"] = self.non_lin()
  
      # treat remaining layers
      for ii in range(1, len(self.hidden_channels)):
          padding_to_use = self.hidden_padding[ii]
          if (
              isinstance(self.hidden_padding[ii], list)
              and len(self.hidden_padding[ii]) == 4
              and self.padding_mode == "zeros"
          ):
              layer_dict[f"padding_{ii}"] = ZeroPad2d(
                  self.hidden_padding[ii]
              )
              padding_to_use = 0
  
          layer_dict[f"conv_{ii}"] = self.convolution_nn(
              in_channels=self.hidden_channels[ii - 1],
              out_channels=self.hidden_channels[ii],
              kernel_size=self.hidden_kernels[ii],
              stride=self.hidden_strides[ii],
              padding=padding_to_use,
              dilation=self.hidden_dilations[ii],
              padding_mode=self.padding_mode,
          )
          layer_dict[f"{self.non_lin.__name__}_{ii}"] = self.non_lin()
  
      return layer_dict
  
file_path: maze/maze/perception/blocks/feed_forward/strided_conv.py
imports: from collections import OrderedDict
  from typing import Union, List, Sequence, Dict, Tuple, Optional
  import torch
  from torch import nn
  from maze.core.annotations import override
  from maze.core.utils.factory import Factory
  from maze.perception.blocks.shape_normalization import ShapeNormalizationBlock
  from torch.nn import ZeroPad2d
label_desc: Use image node_id 3 for calling the StridedConvolutionBlock obj's underlying member method code with example usage: obj.build_layer_dict() and returns: layer_dict