code: def forward(self, x, lengths=None):
      L = x.shape[-1]
      if lengths is not None:
          mask = length_to_mask(lengths * L, max_len=L)
          mask = mask.unsqueeze(1)
          total = mask.sum(axis=2, keepdim=True)
          s = (x * mask).sum(axis=2, keepdim=True) / total
      else:
          s = x.mean(axis=2, keepdim=True)
  
      s = self.relu(self.conv1(s))
      s = self.sigmoid(self.conv2(s))
  
      return s * x
  
imports: import math
  import os
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the SEBlock obj's underlying member method code with example usage: obj.forward(x, lengths) and returns: unknown