Questions tagged [long-short-term-memory]

For questions related to the long-short term memory (LSTM), which refers to a recurrent neural network architecture that uses LSTM units. The first LSTM unit was proposed in 1997 by Sepp Hochreiter and Jürgen Schmidhuber in the paper "Long-Short Term Memory".

Filter by
Sorted by
Tagged with
1
vote
0answers
6 views

some help regarding the usage of word embeddings in sentiment analysis

I have done some reading and I want to implement an LSTM with pre-trained word embeddings (I also have plans to create my word embeddings, but lets cross that bridge when we come to it). In any given ...
2
votes
0answers
20 views

If I want to predict two unrelated values given the same sequence of data points, should I have a model with two outputs or two models?

I want to predict two separate y-values (not really logically connected) based on an input sequence of data (values x). Using LSTM cells. Should I train two models separately or should I just increase ...
0
votes
0answers
21 views

How to make an LSTM ensemble model with different input shapes

This is what I got so far for making an lstm ensemble with one model input for each of the lstm models and for the ensemble model and it works perfectly. ...
1
vote
0answers
40 views

How to improve prediction performance of periodic data?

I have a 1 column dataset of $50 000$ points where 95% of the values equal $-50$. The data looks like the following: $$\begin{matrix} \text{time} & \text{value}\\ 1&-50 \\ 2&-50 \\ 3&-...
0
votes
1answer
79 views

Is it possible to predict $x^2$, $\log(x)$, or variable function of $x$ using RNN?

There were some posts that using RNN can predict the next point of the sine wave function with data history. However, I wondered if it also works on all the functions of $x$, such as $x^2$, $x^3$, $\...
0
votes
0answers
34 views

Seq2Seq Modelling: when implementing some machine translation net, how are special tokens embedded?

When implementing any encoder-decoder network for machine translation, during training we provide the true output sentence to the decoder so that the context vector (from source language) may be ...
0
votes
0answers
66 views

How to make an ensemble model of two LSTM models with different window sizes i.e. different data shapes

Below is the Python code for making an ensemble model. All the inputs are the same for all three models. But what if the models have different input shapes due to different window size, such as LSTM ...
1
vote
0answers
23 views

Using LSTM model to train spatial inputs

I have an $x$-$y$ plane, inside that plane I have 9 paths $(p_1, p_2, \dots, p_3)$. Each path is classified into one of the three classes $(c_1, c_2, c_3)$. Each path has 100 coordinates points i.e $((...
4
votes
2answers
93 views

How should we regularize an LSTM model?

There are five parameters from an LSTM layer for regularization if I am correct. To deal with overfitting, I would start with reducing the layers reducing the hidden units Applying dropout or ...
0
votes
1answer
42 views

Is the working of RNNs, LSTM and GRU sequential or parallel?

You take any blog or any example and all they tell you about is the given picture below. It has 4 different matrices and 3 of whose weights are shared. So, I'm wondering how is this achieved in ...
0
votes
0answers
13 views

Is it possible and if so does it make sense to have dense layers in between LSTM layers?

I am new to LSTMs and I was wondering if it is possible to have LSTM layer then dense then LSTM again and does it make sense?
0
votes
0answers
15 views

Text generation with LSTM with multiple correlated inputs

I am currently working on a music-generation project, inspired by an already existing project called Deepbach. My dataset are the Bach chorales, which are all composed of 4 independent (but related) ...
0
votes
1answer
29 views

Why won't my model train with CTC loss?

I am trying to train an LSTM using CTC loss, but the loss does not decrease when I train it. I have created a minimal example of my issue by creating training data where the network simply has to copy ...
0
votes
0answers
22 views

During Backpropagation in LSTM, why is the previous output $h_{t-1}$ considered constant w.r.t any $W$ while computing derivative?

I've just started learning LSTM, and some points in the process of calculating the gradients are getting me confused. Say, for example, we want to compute $\frac{\partial}{\partial W_i}L$, where $L$ ...
0
votes
0answers
99 views

How are temporal links made between following sequences in RNN?

Say I use an RNN, whatever is the cell's type, to perform time series classification. It can thus be seen as sequence classification. The time series is split into random, equal size, overlapping ...
0
votes
0answers
9 views

Is the information in the hiddenstate of a RNN worth processing further after the input passes the RNN?

I hope the question is understandable. I just wanted to ask if the hidden state, which is passed through the timesteps/cells of an RNN/LSTM/GRU to deliver information from $\text{cell}_{i-1}$ to the $\...
0
votes
0answers
50 views

Understanding Stable Baselines Custom Policies

I'm trying to understand the structure of the custom recurrent policy introduced in the documentation of the Stable Baselines: How exactly is the Lstm NN constructed? (check code below) From what I ...
0
votes
0answers
18 views

Using an LSTM for model-based RL in a POMDP

I am trying to set up an experiment where an agent is exploring an n x n gridworld environment, of which the agent can see some fraction at any given time step. I'd like the agent to build up some ...
2
votes
1answer
33 views

Understanding LSTM through example

I want to code up one time step in a LSTM. My focus is on understanding the functioning of the forget gate layer, input gate layer, candidate values, present and future cell states. Lets assume that ...
0
votes
0answers
38 views

Time series prediction using LSTM and CNN-LSTM: which is better?

I am working on LSTM and CNN to solve the time series prediction problem. I have seen some tutorial examples of time series prediction using CNN-LSTM. But I don't know if it is better than what I ...
2
votes
0answers
36 views

Can One-Hot Vectors be used as Inputs for Recurrent Neural Networks?

When using an RNN to encode a sentence, one normally takes each word, passes it through an embedding layer, and then uses the dense embedding as the input into the RNN. Lets say instead of using dense ...
2
votes
1answer
26 views

Does this diagram represent several LSTMs, or one through several timesteps?

I'm trying to read this paper describing Google's LSTM architecture for machine translation. It features this diagram on page 4: I'm interested in the encoder block, on the left. Apparently, the pink ...
1
vote
0answers
24 views

How does Google's 2016 GNMT architecture work?

I'm trying to read this paper describing Google's LSTM architecture for machine translation from 2016. However, I'm getting stuck as certain things are described too vaguely for me. This is a picture ...
1
vote
0answers
29 views

How is input defined for a biaxial lstm network for generating music?

I am reading Composing Music With Recurrent Neural Networks by Daniel D. Johnson. But I am really confused about the input passed to this network. If we pass notes of music along the time axis, then ...
0
votes
0answers
18 views

How to afine the extremity values in regression prediction with Keras?

I made a stack of bidirectional LSTM layers following by Dense layers (with swish activation functions) in order to predict a continuous value between 0 and 2. I compiled the model with ...
3
votes
1answer
59 views

Is there a common way to build a neural network that seeks to extract spatial and temporal information simultaneously?

Is there a common way to build a neural network that seeks to extract spatial and temporal information simultaneously? Is there an agreed up protocol on how to extract this information? What ...
1
vote
1answer
20 views

How do LSTMs work if the following two matrices are not able to be multiplied?

In the above diagram, the shape of some of the matrices can be seen in the yellow highlight. For instance: The hidden state at timestep t-1 ($h_{t-1}$) has shape $(na, m)$ The input data at timestep t ...
1
vote
0answers
92 views

What is the computational complexity in terms of Big-O notation of a Gated Recurrent Unit Neural network?

I have been digging up of articles across the internet in context of computational complexity of GRU. Interestingly, I came across this article, http://cse.iitkgp.ac.in/~psraja/FNNs%20,RNNs%20,LSTM%...
0
votes
0answers
25 views

In LSTMs, how does the additive property enables better balancing of gradient values during backpropagation?

There are two sources that I'm using to to try and understand why LSTMs reduce the likelihood of the vanishing gradient problem associated with RNNs. Both of these sources mention the reason LSTMs are ...
2
votes
1answer
50 views

Any comparison between transformer and RNN+Attention on the same dataset?

I am wondering what is believed to be the reason for superiority of transformer? I see that some people believe because of the attention mechanism used, it’s able to capture much longer dependencies. ...
0
votes
0answers
22 views

Stateful many-to-many RNN generating artefacts at regular intervals

I am training a stateful LSTM network, with a time series consisting of about 500000 data points spread over 5 years. This time series is split up to batches of 100 timesteps, and fed into the network....
1
vote
0answers
21 views

Duplicating calculations in CNN-LSTM architecture

I want to use frames from video game and analyze them using CNN and LSTM. But when I have the model defined like that ...
1
vote
1answer
26 views

Appropriate metric and approach for natural language generation for small sentences

I am trying to create a language generation model to generate very short sentences/words, like a rapper name generator. The sentences in my dataset are anywhere between 1 word and 15 words (3-155 ...
0
votes
0answers
16 views

What is the difference between TimeDistributed CNN+RNN and passing sequence of features to RNN

I found Keras API that allows to add additional time dimension. ...
1
vote
2answers
71 views

Extract features with CNN and pass as sequence to RNN

I read an article about captioning videos https://blog.coast.ai/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5 and I want to use solution number 4 (extract features ...
0
votes
0answers
15 views

Is there a model suitable to predict one correct value based on a 2D input series?

I am using an encoder-decoder architecture, with 2 layers each in the encoder and decoder and 128 neurons in each hidden layer. The inputs are in a 2D form: one column has the days and the other ...
0
votes
1answer
48 views

What type of model should I fit to increase accuracy?

Currently, I'm working on 6-axis IMU(Inertial Measurment Unit) dataset. This dataset contain 6 axis IMU data of 7 different drivers. The Imu sensor attached on vehicle. The drivers drives same path. ...
0
votes
1answer
108 views

Feeding YOLOv4 image data into LSTM layer?

How would one extract the feature vector from a given input image using YOLOv4 and pass that data into an LSTM to generate captions for the image? I am trying to make an image captioning software in ...
0
votes
0answers
19 views

Avoiding Overfitting with a large LSTM net on a small amount of data

1. Context I'm studying Health-Monitoring techniques, and I practice on the C-MAPSS dataset. The goal is to predict the Remaining Useful Life (RUL) of an engine given sensor measurements series. There'...
0
votes
0answers
12 views

Python code in LSTM to look at selective history

My dataset has 3 columns - a,b,c. Using b (and its history), I wish to predict c. Using list function and converting to array, I can tell python to look at last 20 b's for any b, as input to predict c....
9
votes
1answer
777 views

How can Transformers handle arbitrary length input?

The transformer, introduced in the paper Attention Is All You Need, is a popular new neural network architecture that is commonly viewed as an alternative to recurrent neural networks, like LSTMs and ...
1
vote
0answers
22 views

When past states contain useful information, does A3C perform better than TD3, given that TD3 does not use an LSTM?

I am trying to build an AI that needs to have some information about the past states as well. Therefore, LSTMs are suitable for this. Now, I want to know that for a problem/game like Breakout, where ...
0
votes
0answers
21 views

Descent Training episodes for LSTM + TD3

I am building an AI with TD3 and lstm in both actor and critic. By LSTM size is 5,5 with 3 layers and hidden layers with 400 and 300 neurons respectively. I have states dimension of 5 with each value ...
0
votes
0answers
21 views

TD3+lstm predicting the same output for varying states

I have a model with TD3 + lstm in both actor and critic. I am trying to make it learn to predict some specific actions based on the environment conditions. However i see that the AI predicts very ...
0
votes
0answers
30 views

Generating artificial data by means of LSTM

I got two classes namely positive and negative with 1500 samples on each a total of 3k. A sample sequence is like: ...
0
votes
1answer
66 views

What is the big fuzz about SHA-RNN versus Transformers?

In his paper introducing SHA-RNN (https://arxiv.org/pdf/1911.11423.pdf) Stephen Merity states that neglecting one direction of research (in this case LSTMs) over another (transformers) merily because ...
0
votes
0answers
34 views

Network design to learn multiple sequences of multiple categories

For learning a single sequence, LSTM only should suffice. However, my situation is different here. I have a list of sequences to learn: The sale volumes of 12 months, these are the sequences And ...
0
votes
0answers
30 views

How to feed the LSTM with different length for the latest time step?

I am having a training data set for a time-series dataset like below: ...
0
votes
1answer
68 views

Number of LSTM layers needed to learn a certain number of sequences

Theoretically, number of units for a LSTM layer is the number of hidden states or the max length of sequences as per my practice. For example, in Keras: ...

1
2 3 4 5