class_docstr: Implement FCOS (https://arxiv.org/abs/1904.01355).
class_docstr_tok: ["Implement","FCOS","(","https",":","\/\/arxiv.org\/abs\/1904.01355",")","."]
code: def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]):
      super().__init__()
      self.in_features = cfg.CONFIG.MODEL.FCOS.IN_FEATURES
      self.fpn_strides = cfg.CONFIG.MODEL.FCOS.FPN_STRIDES
      self.yield_proposal = cfg.CONFIG.MODEL.FCOS.YIELD_PROPOSAL
  
      self.fcos_head = FCOSHead(
          cfg, [input_shape[f] for f in self.in_features]
      )
      self.in_channels_to_top_module = (
          self.fcos_head.in_channels_to_top_module
      )
  
      self.fcos_outputs = FCOSOutputs(cfg)
  
imports: import logging
  import math
  from typing import List, Dict
  import torch
  from torch import nn
  from torch.nn import functional
  from ...nn.shape_spec import ShapeSpec
  from ...nn.deform_conv import DeformConvWithChangeableStride
  from ...nn.group_norm import NaiveGroupNorm
  from ...data.structures import Instances, Boxes
  from ...nn.focal_loss import sigmoid_focal_loss_jit
  from ...nn.nms import ml_nms
  from ...utils.loss import IOULoss
  from ...utils.comm import get_world_size, reduce_sum, compute_locations
label_desc: Use image node_id 1 to create a new FCOS object from inherited base classes: nn with example: obj = FCOS(cfg, input_shape)