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(GatedSpatialConv2d, self).__init__(
          in_channels,
          out_channels,
          kernel_size,
          stride,
          padding,
          dilation,
          False,
          _pair(0),
          groups,
          bias,
          "zeros",
      )
  
      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(),
      )
  
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 GatedSpatialConv2d object from inherited base classes: _ConvNd with example: obj = GatedSpatialConv2d(in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias)