    def __init__(self, mode: str) -> None:
        """
        Args:
            mode ('str'):
                If set to "cls", it assumes the first element in the input is the cls token and returns it.
                If set to "mean", it returns the mean of the entire sequence.
        """
        super().__init__()
        self.mode = mode
        assert mode in ["cls", "mean"], "Unsupported mode for SequencePool."
Args:
mode ('str'):
If set to "cls", it assumes the first element in the input is the cls token and returns it.
If set to "mean", it returns the mean of the entire sequence.
towhee/models/layers/sequence_pool.py