class_docstr: Abstract base class for network backbones.
class_docstr_tok: ["Abstract","base","class","for","network","backbones","."]
docstr: This property is a generalization of size_divisibility. Some backbones and training
  recipes require specific padding constraints, such as enforcing divisibility by a specific
  integer (e.g., FPN) or padding to a square (e.g., ViTDet with large-scale jitter
  in :paper:vitdet). `padding_constraints` contains these optional items like:
  {
      "size_divisibility": int,
      "square_size": int,
      # Future options are possible
  }
  `size_divisibility` will read from here if presented and `square_size` indicates the
  square padding size if `square_size` > 0.
  
  TODO: use type of Dict[str, int] to avoid torchscipt issues. The type of padding_constraints
  could be generalized as TypedDict (Python 3.8+) to support more types in the future.
docstr_tok: ["This","property","is","a","generalization","of","size_divisibility",".","Some","backbones","and","training","recipes","require","specific","padding","constraints",",","such","as","enforcing","divisibility","by","a","specific","integer","(","e.g.",",","FPN",")","or","padding","to","a","square","(","e.g.",",","ViTDet","with","large-scale","jitter","in",":","paper",":","vitdet",")",".","`","padding_constraints","`","contains","these","optional","items","like",":","{","``","size_divisibility","''",":","int",",","``","square_size","''",":","int",",","#","Future","options","are","possible","}","`","size_divisibility","`","will","read","from","here","if","presented","and","`","square_size","`","indicates","the","square","padding","size","if","`","square_size","`",">","0",".","TODO",":","use","type","of","Dict","[","str",",","int","]","to","avoid","torchscipt","issues",".","The","type","of","padding_constraints","could","be","generalized","as","TypedDict","(","Python","3.8+",")","to","support","more","types","in","the","future","."]
code: def padding_constraints(self) -> Dict[str, int]:
      """
      This property is a generalization of size_divisibility. Some backbones and training
      recipes require specific padding constraints, such as enforcing divisibility by a specific
      integer (e.g., FPN) or padding to a square (e.g., ViTDet with large-scale jitter
      in :paper:vitdet). `padding_constraints` contains these optional items like:
      {
          "size_divisibility": int,
          "square_size": int,
          # Future options are possible
      }
      `size_divisibility` will read from here if presented and `square_size` indicates the
      square padding size if `square_size` > 0.
  
      TODO: use type of Dict[str, int] to avoid torchscipt issues. The type of padding_constraints
      could be generalized as TypedDict (Python 3.8+) to support more types in the future.
      """
      return {}
  
file_path: detectron2/detectron2/modeling/backbone/backbone.py
imports: from abc import ABCMeta, abstractmethod
  from typing import Dict
  import torch.nn
  from detectron2.layers import ShapeSpec
label_desc: Use image node_id 4 for calling the Backbone obj's underlying member method code with example usage: obj.padding_constraints() and returns: dict