捷徑

DeformConv2d

class torchvision.ops.DeformConv2d(in_channels: int, out_channels: int, kernel_size: int, stride: int = 1, padding: int = 0, dilation: int = 1, groups: int = 1, bias: bool = True)[source]

請參閱deform_conv2d()

forward(input: Tensor, offset: Tensor, mask: Optional[Tensor] = None) Tensor[source]
參數:
  • 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)。

  • mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]) – 要應用於卷積核中每個位置的遮罩 (masks)。

文件

存取 PyTorch 的完整開發者文件

檢視文件

教學

取得針對初學者和進階開發者的深入教學

檢視教學

資源

尋找開發資源並獲得您的問題解答

檢視資源