class_docstr: Wrapper for nn.LSTM
  
  Differences include:
  * weight initialization
  * the bidirectional option makes the first layer bidirectional only
  (and in that case the hidden dim is divided by 2)
class_docstr_tok: ["Wrapper","for","nn.LSTM","Differences","include",":","*","weight","initialization","*","the","bidirectional","option","makes","the","first","layer","bidirectional","only","(","and","in","that","case","the","hidden","dim","is","divided","by","2",")"]
code: def LSTM(input_size, hidden_size, **kwargs):
      m = torch.nn.LSTM(input_size, hidden_size, **kwargs)
      for name, param in m.named_parameters():
          if "weight" in name or "bias" in name:
              param.data.uniform_(-0.1, 0.1)
      return m
  
file_path: pytext/pytext/models/seq_models/rnn_encoder.py
imports: from typing import Dict, List, Tuple
  import torch
  import torch.nn.functional
  from pytext.config import ConfigBase
  from pytext.utils.usage import log_class_usage
  from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
  from .base import PyTextSeq2SeqModule
label_desc: Use image node_id 1 for calling the BiLSTM obj's underlying member method code with example usage: obj.LSTM(input_size, hidden_size) and returns: m