Questions tagged [lstm]

Long short-term memory. A neural network (NN) architecture that contains recurrent NN blocks that can remember a value for an arbitrary length of time. A very popular building block for deep NN.

Long short-term memory neural networks (LSTMs) are a subset of recurrent neural networks. They can take time-series data and make predictions using knowledge of how the system is evolving.

A major benefit to LSTMs is their ability to store and utilize long-term information, not just what they are provided at a particular instance. For more information on LSTMs check out these links from colah's blog post and MachineLearningMastery.

6289 questions
2
votes
1 answer

Multiple outputs for multi step ahead time series prediction with Keras LSTM

Following a similar question, I have a problem where I need to predict many steps ahead of 3 different time series. I managed to generate a network that given the past 7 values of 3 time series as input, predicts 5 future values for one of them. The…
Titus Pullo
  • 3,751
  • 15
  • 45
  • 65
2
votes
1 answer

Correct input_shape for an LSTM in kerasR

I see a lot of help for similar topics in python but I was using the R implementation and can't seem to replicate any of the suggested solutions. I am attempting to setup an LSTM like so, mod <- Sequential() mod$add(LSTM(50, activation = 'relu',…
Taran
  • 265
  • 1
  • 11
2
votes
1 answer

Is it advisable to save the final state from training of an RNN to initialize it during testing?

After training a RNN does it makes sense to save the final state so that it is then the initial state for testing? I am using: stacked_lstm = rnn.MultiRNNCell([rnn.BasicLSTMCell(n_hidden,state_is_tuple=True) for _ in range(number_of_layers)],…
Arraval
  • 1,110
  • 9
  • 20
2
votes
1 answer

tensorflow - how to use variational recurrent dropout correctly

The tensorflow config dropout wrapper has three different dropout probabilities that can be set: input_keep_prob, output_keep_prob, state_keep_prob. I want to use variational dropout for my LSTM units, by setting the variational_recurrent argument…
Lemon
  • 1,394
  • 3
  • 14
  • 24
2
votes
2 answers

How to store a dictionary and map words to ints when using Tensorflow Serving?

I have trained an LSTM RNN classification model on Tensorflow. I was saving and restoring checkpoints to retrain and use the model for testing. Now I want to use Tensorflow serving so that I can use the model in production. Initially, I would parse…
2
votes
1 answer

Change batch size in each training in Tensorflow

I am trying to implement a simple LSTM model in tensorflow. I have lines of sentences as array of char as input. Sample input: ['Y', 'â', 'r', 'â', 'b', ' ', 'n', 'e', ' ', 'i', 'n', 't', 'i', 'z', 'â', 'r', 'd', 'ı', 'r', ' ', 'b', 'u'] Each…
mcemilg
  • 976
  • 1
  • 11
  • 18
2
votes
0 answers

How BatchSize in Keras works ? LSTM-WithState-Time Series

I am working on Time series problem using LSTM (Stateful) on Keras. I have 40,000 samples and using batch size of 64 and look back is 7 days. So my tensor shape is (64, 7, 6) 6 is number of features. My question is when I say batch size = 64; How…
2
votes
0 answers

Predicting Characters From Nietzsche Data Set

I'm building character based autocomplete functionality for a mobile app and am testing my implementation by predicting characters using a nietzsche data set. The data set I'm using…
2
votes
1 answer

Saving and restoring Keras BLSTM CTC model

I have been working on speech emotion recognition deep neural network. I have used keras Bidirectional LSTM with CTC loss. i trained the model and saved it model_json = model.to_json() with open("ctc_model.json", "w") as json_file: …
Solomon
  • 626
  • 1
  • 5
  • 16
2
votes
0 answers

Decoder in Convolutional LSTM

I am trying to implement the convolution lstm network based on this paper: https://arxiv.org/abs/1506.04214, I have implemented the encoder like this: def new_convLSTM_layer(input, # The previous layer. …
MRM
  • 1,099
  • 2
  • 12
  • 29
2
votes
0 answers

How can I export the model as serving format and using that for client?

I use the https://github.com/hzy46/TensorFlow-Time-Series-Examples and want to export the serving model format for client. To export estimator m there are four steps: 1.Define estimator's features. 2.Create a feature config. 3.Build an…
tcclks
  • 31
  • 3
2
votes
0 answers

How to add independent input variables in RNN model

I have customer purchase history and some independent variables associated with each product that customer bought. I am trying to predict the next best predict for customers. T Customer Input1 Input2 ...... Input10 PrdouctBought 1 cust1 2 …
2
votes
1 answer

How to create independent LSTM cells in tensorflow?

I am trying to make a RNN classifier that has 3 different time series with 3 dimensions each as input and the time series can have different lengths. So to solve that, I modeled 3 RNNs and connected them in the final layer. However, I am getting…
2
votes
0 answers

Embedding matrix for seq2seq

I have a question about the implementation of LSTMs in Tensorflow… and especially with the application of seq2seq modelling (where you have an Encoder and Decoder). In short: Learning a word embedding while using the seq2seq model, aren’t we having…
zwep
  • 1,207
  • 12
  • 26
2
votes
0 answers

Tensorflow No gradients provided for any variable LSTM encoder-decoder

I'm new to Tensorflow and i'm trying to impletement LSTM encoder-decoder from scratch using tensorflow, according to this blog post: https://medium.com/@shiyan/understanding-lstm-and-its-diagrams-37e2f46f1714 This is the code for the encoder (using…
Khoa Ngo
  • 117
  • 1
  • 3
  • 8