docstr: :param x: (b, c, t, h, w)
  :return:
docstr_tok: [":","param","x",":","(","b",",","c",",","t",",","h",",","w",")",":","return",":"]
code: def forward(self, x):
      """
      :param x: (b, c, t, h, w)
      :return:
      """
  
      batch_size = x.size(0)
  
      g_x = self.g(x).view(batch_size, self.inter_channels, -1)
      g_x = g_x.permute(0, 2, 1)
  
      theta_x = self.theta(x).view(batch_size, self.inter_channels, -1)
      theta_x = theta_x.permute(0, 2, 1)
      phi_x = self.phi(x).view(batch_size, self.inter_channels, -1)
      f = torch.matmul(theta_x, phi_x)
      f_div_C = F.softmax(f, dim=-1)
  
      y = torch.matmul(f_div_C, g_x)
      y = y.permute(0, 2, 1).contiguous()
      y = y.view(batch_size, self.inter_channels, *x.size()[2:])
      W_y = self.W(y)
      z = W_y + x
  
      return z
  
imports: import fvcore.nn.weight_init
  import torch
  from torch import nn
  from torch.nn import functional
  from detectron2.config import CfgNode
  from detectron2.layers import Conv2d
  from .registry import ROI_DENSEPOSE_HEAD_REGISTRY
label_desc: Use image node_id 2 for calling the _NonLocalBlockND obj's underlying member method code with example usage: obj.forward(x) and returns: z