class_docstr: A semantic segmentation head described in :paper:`PanopticFPN`.
  It takes a list of FPN features as input, and applies a sequence of
  3x3 convs and upsampling to scale all of them to the stride defined by
  ``common_stride``. Then these features are added and used to make final
  predictions by another 1x1 conv layer.
class_docstr_tok: ["A","semantic","segmentation","head","described","in",":","paper",":","`","PanopticFPN","`",".","It","takes","a","list","of","FPN","features","as","input",",","and","applies","a","sequence","of","3x3","convs","and","upsampling","to","scale","all","of","them","to","the","stride","defined","by","``","common_stride","``",".","Then","these","features","are","added","and","used","to","make","final","predictions","by","another","1x1","conv","layer","."]
code: def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]):
      return {
          "input_shape": {
              k: v
              for k, v in input_shape.items()
              if k in cfg.MODEL.SEM_SEG_HEAD.IN_FEATURES
          },
          "ignore_value": cfg.MODEL.SEM_SEG_HEAD.IGNORE_VALUE,
          "num_classes": cfg.MODEL.SEM_SEG_HEAD.NUM_CLASSES,
          "conv_dims": cfg.MODEL.SEM_SEG_HEAD.CONVS_DIM,
          "common_stride": cfg.MODEL.SEM_SEG_HEAD.COMMON_STRIDE,
          "norm": cfg.MODEL.SEM_SEG_HEAD.NORM,
          "loss_weight": cfg.MODEL.SEM_SEG_HEAD.LOSS_WEIGHT,
      }
  
imports: import numpy
  from typing import Callable, Dict, Optional, Tuple, Union
  import fvcore.nn.weight_init
  import torch
  from torch import nn
  from torch.nn import functional
  from detectron2.config import configurable
  from detectron2.layers import Conv2d, ShapeSpec, get_norm
  from detectron2.structures import ImageList
  from detectron2.utils.registry import Registry
  from ..backbone import Backbone, build_backbone
  from ..postprocessing import sem_seg_postprocess
  from .build import META_ARCH_REGISTRY
label_desc: Use image node_id 2 for calling the SemSegFPNHead obj's underlying member method code with example usage: obj.from_config(cls, cfg, input_shape) and returns: dict