code: def forward(self, x):
      B, C, H, W = x.shape
  
      q = self.to_q(x)
      k = self.to_k(x)
      v = self.to_v(x)
  
      # detail enhance
      qkv = paddle.concat([q, k, v], axis=1)
      qkv = self.act(self.dwconv(qkv))
      qkv = self.pwconv(qkv)
  
      # squeeze axial attention
      ## squeeze row
      qrow = (
          self.pos_emb_rowq(q.mean(-1))
          .reshape([B, self.num_heads, -1, H])
          .transpose([0, 1, 3, 2])
      )
      krow = self.pos_emb_rowk(k.mean(-1)).reshape(
          [B, self.num_heads, -1, H]
      )
      vrow = (
          v.mean(-1)
          .reshape([B, self.num_heads, -1, H])
          .transpose([0, 1, 3, 2])
      )
  
      attn_row = paddle.matmul(qrow, krow) * self.scale
      attn_row = F.softmax(attn_row, axis=-1)
      xx_row = paddle.matmul(attn_row, vrow)  # B nH H C
      xx_row = self.proj_encode_row(
          xx_row.transpose([0, 1, 3, 2]).reshape([B, self.dh, H, 1])
      )
  
      ## squeeze column
      qcolumn = (
          self.pos_emb_columnq(q.mean(-2))
          .reshape([B, self.num_heads, -1, W])
          .transpose([0, 1, 3, 2])
      )
      kcolumn = self.pos_emb_columnk(k.mean(-2)).reshape(
          [B, self.num_heads, -1, W]
      )
      vcolumn = (
          v.mean(-2)
          .reshape([B, self.num_heads, -1, W])
          .transpose([0, 1, 3, 2])
      )
  
      attn_column = paddle.matmul(qcolumn, kcolumn) * self.scale
      attn_column = F.softmax(attn_column, axis=-1)
      xx_column = paddle.matmul(attn_column, vcolumn)  # B nH W C
      xx_column = self.proj_encode_column(
          xx_column.transpose([0, 1, 3, 2]).reshape([B, self.dh, 1, W])
      )
  
      xx = xx_row.add(xx_column)
      xx = v.add(xx)
      xx = self.proj(xx)
      xx = self.sigmoid(xx) * qkv
      return xx
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
  from paddleseg.models.backbones.transformer_utils import DropPath, zeros_, ones_
  from paddleseg.utils import utils
label_desc: Use image node_id 2 for calling the SeaAttention obj's underlying member method code with example usage: obj.forward(x) and returns: xx