class_docstr: Feature GCN with coordinate GCN
class_docstr_tok: ["Feature","GCN","with","coordinate","GCN"]
code: def __init__(self, planes, abn=InPlaceABNSync, ratio=4):
      super(DDualGCN, self).__init__()
  
      self.phi = nn.Conv2d(
          planes, planes // ratio * 2, kernel_size=1, bias=False
      )
      self.bn_phi = abn(planes // ratio * 2)
      self.theta = nn.Conv2d(
          planes, planes // ratio, kernel_size=1, bias=False
      )
      self.bn_theta = abn(planes // ratio)
  
      #  Interaction Space
      #  Adjacency Matrix: (-)A_g
      self.conv_adj = nn.Conv1d(
          planes // ratio, planes // ratio, kernel_size=1, bias=False
      )
      self.bn_adj = nn.BatchNorm1d(planes // ratio)
  
      #  State Update Function: W_g
      self.conv_wg = nn.Conv1d(
          planes // ratio * 2,
          planes // ratio * 2,
          kernel_size=1,
          bias=False,
      )
      self.bn_wg = nn.BatchNorm1d(planes // ratio * 2)
  
      #  last fc
      self.conv3 = nn.Conv2d(
          planes // ratio * 2, planes, kernel_size=1, bias=False
      )
      self.bn3 = abn(planes)
  
      self.local = nn.Sequential(
          nn.Conv2d(
              planes,
              planes,
              3,
              groups=planes,
              stride=2,
              padding=1,
              bias=False,
          ),
          abn(planes),
          nn.Conv2d(
              planes,
              planes,
              3,
              groups=planes,
              stride=2,
              padding=1,
              bias=False,
          ),
          abn(planes),
          nn.Conv2d(
              planes,
              planes,
              3,
              groups=planes,
              stride=2,
              padding=1,
              bias=False,
          ),
          abn(planes),
      )
      self.gcn_local_attention = SpatialGCN(planes, abn)
  
      self.final = nn.Sequential(
          nn.Conv2d(planes * 2, planes, kernel_size=1, bias=False),
          abn(planes),
      )
  
      self.gamma1 = nn.Parameter(torch.zeros(1))
  
file_path: insightface/parsing/dml_csr/networks/modules/ddgcn.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import torch
  import torch.nn.functional
  import torch.nn
  from inplace_abn import InPlaceABNSync
label_desc: Use image node_id 1 to create a new DDualGCN object from inherited base classes: nn with example: obj = DDualGCN(planes, abn, ratio)