class_docstr: Feature GCN with coordinate GCN
class_docstr_tok: ["Feature","GCN","with","coordinate","GCN"]
code: def forward(self, feat):
      # # # # Local # # # #
      x = feat
      local = self.local(feat)
      local = self.gcn_local_attention(local)
      local = F.interpolate(
          local, size=x.size()[2:], mode="bilinear", align_corners=True
      )
      spatial_local_feat = x * local + x
  
      # # # # Projection Space # # # #
      x_sqz, b = x, x
  
      x_sqz = self.phi(x_sqz)
      x_sqz = self.bn_phi(x_sqz)
      x_sqz = self.to_matrix(x_sqz)
  
      b = self.theta(b)
      b = self.bn_theta(b)
      b = self.to_matrix(b)
  
      # Project
      z_idt = torch.matmul(x_sqz, b.transpose(1, 2))  # channel
  
      # # # # Interaction Space # # # #
      z = z_idt.transpose(1, 2).contiguous()
  
      z = self.conv_adj(z)
      z = self.bn_adj(z)
  
      z = z.transpose(1, 2).contiguous()
      # Laplacian smoothing: (I - A_g)Z => Z - A_gZ
      z += z_idt
  
      z = self.conv_wg(z)
      z = self.bn_wg(z)
  
      # # # # Re-projection Space # # # #
      # Re-project
      y = torch.matmul(z, b)
  
      n, _, h, w = x.size()
      y = y.view(n, -1, h, w)
  
      y = self.conv3(y)
      y = self.bn3(y)
  
      # g_out = x + y
      # g_out = F.relu_(x+y)
      g_out = self.gamma1 * y + x
  
      # cat or sum, nearly the same results
      out = self.final(torch.cat((spatial_local_feat, g_out), 1))
  
      return out
  
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 3 for calling the DDualGCN obj's underlying member method code with example usage: obj.forward(feat) and returns: out