class_docstr: Sequence pool produces a single embedding from a sequence of embeddings.
  Currently it supports "mean" and "cls".
class_docstr_tok: ["Sequence","pool","produces","a","single","embedding","from","a","sequence","of","embeddings",".","Currently","it","supports","``","mean","''","and","``","cls","''","."]
docstr: 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.
docstr_tok: ["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","."]
code: 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."
  
imports: import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new SequencePool object from inherited base classes: nn with example: obj = SequencePool(mode)