code: def forward(self, x):
      b, _, h, w = x.shape
  
      hmaps = self.conv_n(x)
      fmaps = self.conv_d(x)
      r = paddle.bmm(
          hmaps.reshape((b, self.n_r, h * w)),
          fmaps.reshape((b, self.d_out, h * w)).transpose((0, 2, 1)),
      )
      return r
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import nn
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the WeightAggregate obj's underlying member method code with example usage: obj.forward(x) and returns: r