class_docstr: Dynamic Convolution.
class_docstr_tok: ["Dynamic","Convolution","."]
code: def __init__(
      self,
      conv_func: Callable,
      in_channels: int,
      out_channels: int,
      use_dyfuse: bool = True,
      use_dyrelu: bool = False,
      use_dcn: bool = False,
  ):
      super().__init__()
  
      self.dyconvs = nn.ModuleList()
      self.dyconvs.append(conv_func(in_channels, out_channels, 1))
      self.dyconvs.append(conv_func(in_channels, out_channels, 1))
      self.dyconvs.append(conv_func(in_channels, out_channels, 2))
  
      if use_dyfuse:
          self.attnconv = nn.Sequential(
              nn.AdaptiveAvgPool2d(1),
              nn.Conv2d(in_channels, 1, kernel_size=1),
              nn.ReLU(inplace=True),
          )
          self.h_sigmoid = nn.Hardsigmoid(inplace=True)
      else:
          self.attnconv = None
  
      if use_dyrelu:
          self.relu = DyReLU(in_channels, out_channels)
      else:
          self.relu = nn.ReLU()
  
      if use_dcn:
          self.offset = nn.Conv2d(
              in_channels, 27, kernel_size=3, stride=1, padding=1
          )
      else:
          self.offset = None
  
      self.init_weights()
  
imports: import copy
  import math
  from typing import Callable, List, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import Scale
  from mmcv.ops.modulated_deform_conv import ModulatedDeformConv2d
  from mmengine.config import ConfigDict
  from mmengine.model import BaseModel
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import cat_boxes
  from mmdet.utils import InstanceList, OptInstanceList, reduce_mean
  from ..utils import BertEncoderLayer, VLFuse, filter_scores_and_topk, permute_and_flatten, select_single_mlvl, unpack_gt_instances
  from ..utils.vlfuse_helper import MAX_CLAMP_VALUE
  from .atss_head import ATSSHead
label_desc: Use image node_id 1 to create a new DyConv object from inherited base classes: nn with example: obj = DyConv(conv_func, in_channels, out_channels, use_dyfuse, use_dyrelu, use_dcn)