class_docstr: A block transforming a common nn.Module to a shape-normalized Maze perception block.
  
  :param in_keys: Keys identifying the input tensors.
  :param out_keys: Keys identifying the output tensors.
  :param in_shapes: List of input shapes.
  :param in_num_dims: Required number of dimensions for corresponding input.
  :param out_num_dims: Required number of dimensions for corresponding output.
  :param net: An nn.Module PyTorch net (the forward method of which must accept a Tensor input dict as parameter
              and must return a Tensor output dict)
docstr: implementation of :class:`~maze.perception.blocks.shape_normalization.ShapeNormalizationBlock` interface
          
docstr_tok: ["implementation","of",":","class",":","`","~maze.perception.blocks.shape_normalization.ShapeNormalizationBlock","`","interface"]
code: def normalized_forward(
      self, block_input: Dict[str, torch.Tensor]
  ) -> Dict[str, torch.Tensor]:
      """implementation of :class:`~maze.perception.blocks.shape_normalization.ShapeNormalizationBlock` interface"""
  
      for i, in_key in enumerate(self.in_keys):
          assert block_input[in_key].ndim == self.in_num_dims[i]
  
      # forward pass
      block_output = self.net(block_input)
  
      for i, out_key in enumerate(self.out_keys):
          assert block_output[out_key].ndim == self.out_num_dims[i]
  
      return block_output
  
file_path: maze/maze/perception/blocks/general/torch_model_block.py
imports: from typing import Union, List, Sequence, Dict
  import torch
  import torch.nn
  from maze.core.annotations import override
  from maze.perception.blocks.shape_normalization import ShapeNormalizationBlock
label_desc: Use image node_id 2 for calling the TorchModelBlock obj's underlying member method code with example usage: obj.normalized_forward(block_input) and returns: block_output