class_docstr: A deformable conv layer with dynamic stride.
  
  See "https://github.com/pytorch/vision/blob/master/torchvision/ops/deform_conv.py" for usage.
  There are currently some limitations, e.g. deformable_groups must be 1.
class_docstr_tok: ["A","deformable","conv","layer","with","dynamic","stride",".","See","``","https",":","\/\/github.com\/pytorch\/vision\/blob\/master\/torchvision\/ops\/deform_conv.py","''","for","usage",".","There","are","currently","some","limitations",",","e.g",".","deformable_groups","must","be","1","."]
code: def forward(self, x, offset, stride):
      if x.numel() == 0:
          # When input is empty, we want to return a empty tensor with "correct" shape,
          # So that the following operations will not panic
          # if they check for the shape of the tensor.
          # This computes the height and width of the output tensor
          output_shape = [
              (i + 2 * p - (di * (k - 1) + 1)) // s + 1
              for i, p, di, k, s in zip(
                  x.shape[-2:],
                  self.padding,
                  self.dilation,
                  self.kernel_size,
                  self.stride,
              )
          ]
          output_shape = [
              x.shape[0],
              self.weight.shape[0],
          ] + output_shape
          return _NewEmptyTensorOp.apply(x, output_shape)
  
      stride = _pair(stride)
      x = deform_conv2d(
          x,
          offset,
          self.weight,
          self.bias,
          stride,
          self.padding,
          self.dilation,
      )
      if self.norm is not None:
          x = self.norm(x)
      if self.activation is not None:
          x = self.activation(x)
      return x
  
file_path: gluon-cv/gluoncv/torch/nn/deform_conv.py
imports: import torch
  from torch import nn
  from torch.nn.modules.utils import _pair
  from torchvision.ops import deform_conv2d
label_desc: Use image node_id 2 for calling the DeformConvWithChangeableStride obj's underlying member method code with example usage: obj.forward(x, offset, stride) and returns: x, _NewEmptyTensorOp