class_docstr: Applies temporal pooling operations on masked inputs. For each pooling operation
  all masked values are ignored.
class_docstr_tok: ["Applies","temporal","pooling","operations","on","masked","inputs",".","For","each","pooling","operation","all","masked","values","are","ignored","."]
docstr: method (str): the method of pooling to use. Options:
      'max': reduces temporal dimension to each valid max value.
      'avg': averages valid values in the temporal dimension.
      'sum': sums valid values in the temporal dimension.
      Note if all batch row elements are invalid, the temporal dimension is
      pooled to 0 values.
docstr_tok: ["method","(","str",")",":","the","method","of","pooling","to","use",".","Options",":","'max","'",":","reduces","temporal","dimension","to","each","valid","max","value",".","'avg","'",":","averages","valid","values","in","the","temporal","dimension",".","'sum","'",":","sums","valid","values","in","the","temporal","dimension",".","Note","if","all","batch","row","elements","are","invalid",",","the","temporal","dimension","is","pooled","to","0","values","."]
code: def __init__(self, method: str):
      """
      method (str): the method of pooling to use. Options:
          'max': reduces temporal dimension to each valid max value.
          'avg': averages valid values in the temporal dimension.
          'sum': sums valid values in the temporal dimension.
          Note if all batch row elements are invalid, the temporal dimension is
          pooled to 0 values.
      """
      super().__init__()
      assert method in ("max", "avg", "sum")
      self._method = method
  
imports: from typing import List, Optional, Tuple
  import torch
  from pytorchvideo.layers.utils import set_attributes
  from torch import nn
  from torch.nn.utils.rnn import pack_padded_sequence
label_desc: Use image node_id 1 to create a new MaskedTemporalPooling object from inherited base classes: torch.nn with example: obj = MaskedTemporalPooling(method)