def attention(self, x: paddle.Tensor):
        """Class Method: *.to, not convert, please check whether it is torch.Tensor.*/Optimizer.*/nn.Module.*, and convert manually"""
        self.attn_mask = self.attn_mask.astype(
            x.dtype) if self.attn_mask is not None else None
        x = x.transpose([1, 0, 2])
        x = self.attn(x, x, x, attn_mask=self.attn_mask)
        return x.transpose([1, 0, 2])
Class Method: *.to, not convert, please check whether it is torch.Tensor.*/Optimizer.*/nn.Module.*, and convert manually
contrib/SegmentAnything/segment_anything/modeling/clip_paddle.py