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 = 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
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.onnx.operators
  from fairseq import options, utils
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, register_model, register_model_architecture
  from fairseq.modules import AdaptiveSoftmax
  from pytorch_translate import attention, rnn_cell, utils, vocab_reduction
  from pytorch_translate.common_layers import ContextEmbedding, DecoderWithOutputProjection, Embedding, Linear, RNNLayer, VariableTracker
  from pytorch_translate.data import data
  from pytorch_translate.multi_model import MultiDecoder, MultiEncoder
  from pytorch_translate.multilingual import MultilingualDecoder, MultilingualEncoder
  from pytorch_translate.ngram import NGramDecoder
  from pytorch_translate.semi_supervised import SemiSupervisedModel
  from pytorch_translate.utils import maybe_cat, maybe_cuda, torch_find
  from torch.nn.utils.rnn import pack_padded_sequence, PackedSequence, pad_packed_sequence
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