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): Optionals include "cls" and "mean". 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",")",":","Optionals","include","``","cls","''","and","``","mean","''",".","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): Optionals include "cls" and "mean". 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__()
      assert mode in [
          "cls",
          "mean",
      ], "Unsupported mode for SequencePool."
      self.mode = mode
  
imports: from typing import Callable, Tuple
  import torch
  import torch.nn
  from pytorchvideo.layers.utils import set_attributes
  from torchvision.ops import RoIAlign
label_desc: Use image node_id 1 to create a new SequencePool object from inherited base classes: nn with example: obj = SequencePool(mode)