class_docstr: Bidirectional LSTM running over word embeddings.
class_docstr_tok: ["Bidirectional","LSTM","running","over","word","embeddings","."]
code: def __init__(
      self,
      word_embedding_dimension: int,
      hidden_dim: int,
      num_layers: int = 1,
      dropout: float = 0,
      bidirectional: bool = True,
  ):
      nn.Module.__init__(self)
      self.config_keys = [
          "word_embedding_dimension",
          "hidden_dim",
          "num_layers",
          "dropout",
          "bidirectional",
      ]
      self.word_embedding_dimension = word_embedding_dimension
      self.hidden_dim = hidden_dim
      self.num_layers = num_layers
      self.dropout = dropout
      self.bidirectional = bidirectional
  
      self.embeddings_dimension = hidden_dim
      if self.bidirectional:
          self.embeddings_dimension *= 2
  
      self.encoder = nn.LSTM(
          word_embedding_dimension,
          hidden_dim,
          num_layers=num_layers,
          dropout=dropout,
          bidirectional=bidirectional,
          batch_first=True,
      )
  
file_path: sentence-transformers/sentence_transformers/models/LSTM.py
imports: import torch
  from torch import nn
  from typing import List
  import os
  import json
label_desc: Use image node_id 1 to create a new LSTM object from inherited base classes: nn with example: obj = LSTM(word_embedding_dimension, hidden_dim, num_layers, dropout, bidirectional)