class_docstr: See :func:`deform_conv2d`.
class_docstr_tok: ["See",":","func",":","`","deform_conv2d","`","."]
docstr: Args:
      input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor
      offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, out_height, out_width]):
          offsets to be applied for each position in the convolution kernel.
      mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]):
          masks to be applied for each position in the convolution kernel.
docstr_tok: ["Args",":","input","(","Tensor","[","batch_size",",","in_channels",",","in_height",",","in_width","]",")",":","input","tensor","offset","(","Tensor","[","batch_size",",","2","*","offset_groups","*","kernel_height","*","kernel_width",",","out_height",",","out_width","]",")",":","offsets","to","be","applied","for","each","position","in","the","convolution","kernel",".","mask","(","Tensor","[","batch_size",",","offset_groups","*","kernel_height","*","kernel_width",",","out_height",",","out_width","]",")",":","masks","to","be","applied","for","each","position","in","the","convolution","kernel","."]
code: def forward(
      self, input: Tensor, offset: Tensor, mask: Optional[Tensor] = None
  ) -> Tensor:
      """
      Args:
          input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor
          offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, out_height, out_width]):
              offsets to be applied for each position in the convolution kernel.
          mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]):
              masks to be applied for each position in the convolution kernel.
      """
      return deform_conv2d(
          input,
          offset,
          self.weight,
          self.bias,
          stride=self.stride,
          padding=self.padding,
          dilation=self.dilation,
          mask=mask,
      )
  
file_path: vision/torchvision/ops/deform_conv.py
imports: import math
  from typing import Optional, Tuple
  import torch
  from torch import nn, Tensor
  from torch.nn import init
  from torch.nn.modules.utils import _pair
  from torch.nn.parameter import Parameter
  from torchvision.extension import _assert_has_ops
  from ..utils import _log_api_usage_once
label_desc: Use image node_id 3 for calling the DeformConv2d obj's underlying member method code with example usage: obj.forward(input, offset, mask) and returns: deform_conv2d