code: def forward(self, x):
      if self.upsample:
          new_features = []
          for layer in self.layers:
              out = layer(x)
              x = torch.cat([x, out], 1)
              new_features.append(out)
          out = torch.cat(new_features, 1)
          fm_size = out.size()[2]
          scale_weight = F.avg_pool2d(out, fm_size)
          scale_weight = F.relu(self.SE_upsample1(scale_weight))
          scale_weight = F.sigmoid(self.SE_upsample2(scale_weight))
          out = out * scale_weight.expand_as(out)
          return out
      else:
          for layer in self.layers:
              out = layer(x)
              x = torch.cat([x, out], 1)  # 1 = channel axis
          fm_size = x.size()[2]
          scale_weight = F.avg_pool2d(x, fm_size)
          scale_weight = F.relu(self.SE1(scale_weight))
          scale_weight = F.sigmoid(self.SE2(scale_weight))
          x = x * scale_weight.expand_as(x)
          return x
  
imports: import torch
  import torch.functional
  import torch.nn
label_desc: Use image node_id 2 for calling the DenseBlock obj's underlying member method code with example usage: obj.forward(x) and returns: out, x