code: def forward(self, x):
      # b, c, h, w = x.size()
      node_k = self.node_k(x)
      node_v = self.node_v(x)
      node_q = self.node_q(x)
      b, c, h, w = node_k.size()
      node_k = node_k.view(b, c, -1).permute(0, 2, 1)
      node_q = node_q.view(b, c, -1)
      node_v = node_v.view(b, c, -1).permute(0, 2, 1)
      # A = k * q
      # AV = k * q * v
      # AVW = k *(q *v) * w
      AV = torch.bmm(node_q, node_v)
      AV = self.softmax(AV)
      AV = torch.bmm(node_k, AV)
      AV = AV.transpose(1, 2).contiguous()
      AVW = self.conv_wg(AV)
      AVW = self.bn_wg(AVW)
      AVW = AVW.view(b, c, h, -1)
      # out = F.relu_(self.out(AVW) + x)
      out = self.gamma * self.out(AVW) + x
      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 2 for calling the SpatialGCN obj's underlying member method code with example usage: obj.forward(x) and returns: out