class_docstr: Wrapper for torch.nn.LSTM that handles masked inputs.
class_docstr_tok: ["Wrapper","for","torch.nn.LSTM","that","handles","masked","inputs","."]
docstr: Args:
    dim_in (int): input feature dimension
    hidden_dim (int): hidden dimesion of lstm layer
    dropout (float): dropout rate - 0.0 if no dropout
    bidirectional (bool): bidirectional or forward only
docstr_tok: ["Args",":","dim_in","(","int",")",":","input","feature","dimension","hidden_dim","(","int",")",":","hidden","dimesion","of","lstm","layer","dropout","(","float",")",":","dropout","rate","-","0.0","if","no","dropout","bidirectional","(","bool",")",":","bidirectional","or","forward","only"]
code: def __init__(
      self,
      dim_in: int,
      hidden_dim: int,
      dropout: float = 0.0,
      bidirectional: bool = False,
  ):
      """
      Args:
        dim_in (int): input feature dimension
        hidden_dim (int): hidden dimesion of lstm layer
        dropout (float): dropout rate - 0.0 if no dropout
        bidirectional (bool): bidirectional or forward only
      """
      super().__init__()
      self.lstm = nn.LSTM(
          dim_in,
          hidden_dim,
          batch_first=True,
          dropout=dropout,
          bidirectional=bidirectional,
      )
      self.lstm.flatten_parameters()
      self.output_dim = 2 * hidden_dim if bidirectional else hidden_dim
      self.bidirectional = bidirectional
  
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 LSTM object from inherited base classes: nn with example: obj = LSTM(dim_in, hidden_dim, dropout, bidirectional)