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 __init__(
      self,
      in_channels,
      out_channels,
      kernel_size,
      padding=0,
      dilation=1,
      groups=1,
      deformable_groups=1,
      bias=False,
      norm=None,
      activation=None,
  ):
      super(DeformConvWithChangeableStride, self).__init__()
  
      assert (
          in_channels % groups == 0
      ), "in_channels {} cannot be divisible by groups {}".format(
          in_channels, groups
      )
      assert (
          out_channels % groups == 0
      ), "out_channels {} cannot be divisible by groups {}".format(
          out_channels, groups
      )
  
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.kernel_size = _pair(kernel_size)
      self.padding = _pair(padding)
      self.dilation = _pair(dilation)
      self.groups = groups
      self.deformable_groups = deformable_groups
      # TODO(zhreshold): torchvision version of deform_conv limitation
      assert (
          self.deformable_groups == 1
      ), "deformable_groups can only be 1 at this time"
      self.norm = norm
      self.activation = activation
  
      self.weight = nn.Parameter(
          torch.Tensor(
              out_channels,
              in_channels // self.groups,
              *self.kernel_size,
          )
      )
      if bias:
          self.bias = nn.Parameter(torch.Tensor(out_channels))
      else:
          self.bias = None
  
      nn.init.kaiming_uniform_(self.weight, nonlinearity="relu")
      nn.init.constant_(self.bias, 0.0)
  
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 1 to create a new DeformConvWithChangeableStride object from inherited base classes: nn with example: obj = DeformConvWithChangeableStride(in_channels, out_channels, kernel_size, padding, dilation, groups, deformable_groups, bias, norm, activation)