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]¶
- Parameters:
输入 (张量[批量大小, 输入通道数, 输入高度, 输入宽度]) – 输入张量
offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, out_height, out_width]) – 在卷积核的每个位置上应用的偏移量。
mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]) – 用于卷积核中每个位置的掩码。