class_docstr: A global average pooling block.
  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.
code: def __init__(
      self,
      in_keys: Union[str, List[str]],
      out_keys: Union[str, List[str]],
      in_shapes: Union[Sequence[int], List[Sequence[int]]],
  ):
      super().__init__(
          in_keys=in_keys,
          out_keys=out_keys,
          in_shapes=in_shapes,
          in_num_dims=4,
          out_num_dims=2,
      )
  
      # compile network
      self.net = nn.AdaptiveAvgPool2d(output_size=(1, 1))
  
file_path: maze/maze/perception/blocks/general/gap.py
imports: from typing import Union, List, Sequence, Dict
  import torch
  from torch import nn
  from maze.core.annotations import override
  from maze.perception.blocks.shape_normalization import ShapeNormalizationBlock
label_desc: Use image node_id 1 to create a new GlobalAveragePoolingBlock object from inherited base classes: ShapeNormalizationBlock with example: obj = GlobalAveragePoolingBlock(in_keys, out_keys, in_shapes)