code: def forward(self, x):
      bs = x.shape[0]
  
      x = self.DownBlock(x)
  
      content_features = []
      for i in range(self.n_blocks):
          x = getattr(self, "EncodeBlock" + str(i + 1))(x)
          content_features.append(
              F.adaptive_avg_pool2d(x, 1).reshape([bs, -1])
          )
  
      gap = F.adaptive_avg_pool2d(x, 1)
      gap_logit = self.gap_fc(gap.reshape([bs, -1]))
      gap_weight = list(self.gap_fc.parameters())[0].transpose([1, 0])
      gap = x * gap_weight.unsqueeze(2).unsqueeze(3)
  
      gmp = F.adaptive_max_pool2d(x, 1)
      gmp_logit = self.gmp_fc(gmp.reshape([bs, -1]))
      gmp_weight = list(self.gmp_fc.parameters())[0].transpose([1, 0])
      gmp = x * gmp_weight.unsqueeze(2).unsqueeze(3)
  
      cam_logit = paddle.concat([gap_logit, gmp_logit], 1)
      x = paddle.concat([gap, gmp], 1)
      x = self.relu(self.conv1x1(x))
  
      heatmap = paddle.sum(x, axis=1, keepdim=True)
  
      if self.light:
          x_ = F.adaptive_avg_pool2d(x, 1)
          style_features = self.FC(x_.reshape([bs, -1]))
      else:
          style_features = self.FC(x.reshape([bs, -1]))
  
      for i in range(self.n_blocks):
          x = getattr(self, "DecodeBlock" + str(i + 1))(
              x, content_features[4 - i - 1], style_features
          )
  
      out = self.UpBlock(x)
  
      return out, cam_logit, heatmap
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the ResnetGenerator obj's underlying member method code with example usage: obj.forward(x) and returns: out,  cam_logit,  heatmap