docstr: :param in_channels:
  :param out_channels:
  :param kernel_size:
  :param stride:
  :param padding:
  :param dilation:
  :param groups:
  :param bias:
docstr_tok: [":","param","in_channels",":",":","param","out_channels",":",":","param","kernel_size",":",":","param","stride",":",":","param","padding",":",":","param","dilation",":",":","param","groups",":",":","param","bias",":"]
code: def __init__(
      self,
      in_channels,
      out_channels,
      kernel_size=1,
      stride=1,
      padding=0,
      dilation=1,
      groups=1,
      bias=False,
  ):
      """
  
      :param in_channels:
      :param out_channels:
      :param kernel_size:
      :param stride:
      :param padding:
      :param dilation:
      :param groups:
      :param bias:
      """
  
      kernel_size = _pair(kernel_size)
      stride = _pair(stride)
      padding = _pair(padding)
      dilation = _pair(dilation)
      super(HighFrequencyGatedSpatialConv2d, self).__init__(
          in_channels,
          out_channels,
          kernel_size,
          stride,
          padding,
          dilation,
          False,
          _pair(0),
          groups,
          bias,
      )
  
      self._gate_conv = nn.Sequential(
          N2d(in_channels + 1),
          nn.Conv2d(in_channels + 1, in_channels + 1, 1),
          nn.ReLU(),
          nn.Conv2d(in_channels + 1, 1, 1),
          N2d(1),
          nn.Sigmoid(),
      )
  
      kernel_size = 7
      sigma = 3
  
      x_cord = torch.arange(kernel_size).float()
      x_grid = (
          x_cord.repeat(kernel_size)
          .view(kernel_size, kernel_size)
          .float()
      )
      y_grid = x_grid.t().float()
      xy_grid = torch.stack([x_grid, y_grid], dim=-1).float()
  
      mean = (kernel_size - 1) / 2.0
      variance = sigma**2.0
      gaussian_kernel = (1.0 / (2.0 * math.pi * variance)) * torch.exp(
          -torch.sum((xy_grid - mean) ** 2.0, dim=-1) / (2 * variance)
      )
  
      gaussian_kernel = gaussian_kernel / torch.sum(gaussian_kernel)
  
      gaussian_kernel = gaussian_kernel.view(
          1, 1, kernel_size, kernel_size
      )
      gaussian_kernel = gaussian_kernel.repeat(in_channels, 1, 1, 1)
  
      self.gaussian_filter = nn.Conv2d(
          in_channels=in_channels,
          out_channels=in_channels,
          padding=3,
          kernel_size=kernel_size,
          groups=in_channels,
          bias=False,
      )
  
      self.gaussian_filter.weight.data = gaussian_kernel
      self.gaussian_filter.weight.requires_grad = False
  
      self.cw = nn.Conv2d(in_channels * 2, in_channels, 1)
  
      self.procdog = nn.Sequential(
          nn.Conv2d(in_channels, in_channels, 1),
          N2d(in_channels),
          nn.Sigmoid(),
      )
  
imports: import torch.nn
  import torch
  import torch.nn.functional
  from torch.nn.modules.conv import _ConvNd
  from torch.nn.modules.utils import _pair
  import numpy
  import math
  from ..mynn import Norm2d
  from .custom_functional import conv2d_same
label_desc: Use image node_id 1 to create a new HighFrequencyGatedSpatialConv2d object from inherited base classes: _ConvNd with example: obj = HighFrequencyGatedSpatialConv2d(in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias)