docstr: Args:
      input: NCHW images
      rois: Bx6 boxes. First column is the index into N.
          The other 5 columns are (x_ctr, y_ctr, width, height, angle_degrees).
docstr_tok: ["Args",":","input",":","NCHW","images","rois",":","Bx6","boxes",".","First","column","is","the","index","into","N.","The","other","5","columns","are","(","x_ctr",",","y_ctr",",","width",",","height",",","angle_degrees",")","."]
code: def forward(self, input, rois):
      """
      Args:
          input: NCHW images
          rois: Bx6 boxes. First column is the index into N.
              The other 5 columns are (x_ctr, y_ctr, width, height, angle_degrees).
      """
      assert rois.dim() == 2 and rois.size(1) == 6
      orig_dtype = input.dtype
      if orig_dtype == torch.float16:
          input = input.float()
          rois = rois.float()
      output_size = _pair(self.output_size)
  
      # Scripting for Autograd is currently unsupported.
      # This is a quick fix without having to rewrite code on the C++ side
      if torch.jit.is_scripting() or torch.jit.is_tracing():
          return torch.ops.detectron2.roi_align_rotated_forward(
              input,
              rois,
              self.spatial_scale,
              output_size[0],
              output_size[1],
              self.sampling_ratio,
          ).to(dtype=orig_dtype)
  
      return roi_align_rotated(
          input,
          rois,
          self.output_size,
          self.spatial_scale,
          self.sampling_ratio,
      ).to(dtype=orig_dtype)
  
file_path: detectron2/detectron2/layers/roi_align_rotated.py
imports: import torch
  from torch import nn
  from torch.autograd import Function
  from torch.autograd.function import once_differentiable
  from torch.nn.modules.utils import _pair
label_desc: Use image node_id 2 for calling the ROIAlignRotated obj's underlying member method code with example usage: obj.forward(input, rois) and returns: roi_align_rotated, torch