docstr: LSTMMiddleware or Long Short Term Memory Middleware can be used in the middle part of the network. It takes the
  embeddings from the input embedders, after they were aggregated in some method (for example, concatenation)
  and passes it through a neural network  which can be customizable but shared between the heads of the network.
  
  :param params: parameters object containing batchnorm, activation_function, dropout and
      number_of_lstm_cells properties.
docstr_tok: ["LSTMMiddleware","or","Long","Short","Term","Memory","Middleware","can","be","used","in","the","middle","part","of","the","network",".","It","takes","the","embeddings","from","the","input","embedders",",","after","they","were","aggregated","in","some","method","(","for","example",",","concatenation",")","and","passes","it","through","a","neural","network","which","can","be","customizable","but","shared","between","the","heads","of","the","network",".",":","param","params",":","parameters","object","containing","batchnorm",",","activation_function",",","dropout","and","number_of_lstm_cells","properties","."]
code: def __init__(self, params: LSTMMiddlewareParameters):
      """
      LSTMMiddleware or Long Short Term Memory Middleware can be used in the middle part of the network. It takes the
      embeddings from the input embedders, after they were aggregated in some method (for example, concatenation)
      and passes it through a neural network  which can be customizable but shared between the heads of the network.
  
      :param params: parameters object containing batchnorm, activation_function, dropout and
          number_of_lstm_cells properties.
      """
      super(LSTMMiddleware, self).__init__(params)
      self.number_of_lstm_cells = params.number_of_lstm_cells
      with self.name_scope():
          self.lstm = rnn.LSTM(hidden_size=self.number_of_lstm_cells)
  
file_path: coach/rl_coach/architectures/mxnet_components/middlewares/lstm_middleware.py
imports: from typing import Union
  from types import ModuleType
  import mxnet
  from mxnet.gluon import rnn
  from rl_coach.architectures.mxnet_components.layers import Dense
  from rl_coach.architectures.mxnet_components.middlewares.middleware import Middleware
  from rl_coach.architectures.middleware_parameters import LSTMMiddlewareParameters
  from rl_coach.base_parameters import MiddlewareScheme
label_desc: Use image node_id 1 to create a new LSTMMiddleware object from inherited base classes: Middleware with example: obj = LSTMMiddleware(params)