lstm_update

ivy.neural_net_functional.layers.lstm_update(x, init_h, init_c, kernel, recurrent_kernel, bias=None, recurrent_bias=None)[source]

Perform long-short term memory update by unrolling time dimension of input array.

Parameters
  • x (array) – input tensor of LSTM layer [batch_shape, t, in].

  • init_h (array) – initial state tensor for the cell output [batch_shape, out].

  • init_c (array) – initial state tensor for the cell hidden state [batch_shape, out].

  • kernel (array) – weights for cell kernel [in, 4 x out].

  • recurrent_kernel (array) – weights for cell recurrent kernel [out, 4 x out].

  • bias (array) – bias for cell kernel [4 x out].

  • recurrent_bias (array) – bias for cell recurrent kernel [4 x out].

Returns

hidden state for all timesteps [batch_shape,t,out] and cell state for last timestep [batch_shape,out]


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty