class_docstr: Deep supervision head takes all feature maps and applies 1x1 convolution to each of them.
code: def forward(
      self, feature_maps: List[torch.Tensor], output_size=None
  ) -> Dict[str, torch.Tensor]:
      if self.output_name_prefix is None:
          outputs = []
          for feature_map, head, output_stride in zip(
              feature_maps, self.heads, self.output_spec.strides
          ):
              output = head(feature_map)
              outputs.append(output)
      else:
          outputs = {}
          for feature_map, head, output_stride in zip(
              feature_maps, self.heads, self.output_spec.strides
          ):
              output = head(feature_map)
              outputs[
                  name_for_stride(
                      self.output_name_prefix, output_stride
                  )
              ] = output
  
      return outputs
  
file_path: pytorch-toolbelt/pytorch_toolbelt/modules/heads/deep_supervision.py
imports: from typing import List, Dict, Optional, Callable
  import torch
  import torch.nn
  from pytorch_toolbelt.datasets import name_for_stride
  from pytorch_toolbelt.modules.simple import conv1x1
  from pytorch_toolbelt.modules.interfaces import AbstractHead, FeatureMapsSpecification
label_desc: Use image node_id 2 for calling the DeepSupervisionHead obj's underlying member method code with example usage: obj.forward(feature_maps, output_size) and returns: outputs