Questions tagged [gated-recurrent-unit]

A Gated Recurrent Unit (GRU) is a type of unit in a recurrent neural network.

80 questions
1
vote
1 answer

Combined GRU and CNN network always returns the same value for all inputs

I am trying to train a combined CNN and GRU/LSTM to find out the number of objetcs in a series of pictures that move and the number of objects that do not move. For this reason I am using a CNN to process my images and consequently use a GRU. My…
1
vote
0 answers

LSTM/GRU and the use of overlapping sliding windows

Context I am currently running some experiments with LSTMs / GRUs in Keras. Anyhow, the following questions also relate to the general functionality of these networks, which means an answer does not have to be Keras-specific. For my experiments I…
Markus
  • 2,265
  • 5
  • 28
  • 54
1
vote
1 answer

How to get the last output and full sequence of LSTM or GRU in Keras at same time?

In Keras, when using LSTM or GRU, if I set return_sequences=False, I will get the last output; if I set return_sequences=True, I will get the full sequence; but how to get them both at the same time?
1
vote
0 answers

GRU with random selection data in keras

I use a recurrent network (in special GRU) for predict a time serie with a lenght of 90 occurrences. The type of data is multivariante, and a follow this example. Multivariante Time Series Option 1: I use keras for develop the rnn n_train_quarter =…
Francisco Gonzalez
  • 437
  • 1
  • 3
  • 15
1
vote
1 answer

How to reset the state of a GRU in tensorflow after every epoch

I am using the tensorflow GRU cell to implement an RNN. I am using the aforementioned with videos that range for maximum 5 mins. Therefore, since the next state is fed automatically into the GRU, how can I reset manually the state of the RNN after…
1
vote
1 answer

GRU in DeepLearning4J

I am trying to find a GRU implementation within DeepLearning4J but cannot seem to find one. Does anyone know if GRU's are implemented within DL4J? If so can you please direct me to an example. If not, is this on their roadmap anywhere? Thanks
1
vote
1 answer

what is the principle of readout and teacher forcing?

These days I study something about RNN and teacher forcing. But there is one point that I can't figure out. What is the principle of readout and teacher forcing? How can we feeding the output(or ground truth) of RNN from the previous time step back…
1
vote
1 answer

Xavier Initialization for GRU Cells

Trying to initialize my seq2seq-model. I am using the GRU Cells, but cannot figure out Xavier-Initialization. The code in rnn_cell.py doesnt seem to allow that. Any ideas? Need to do this manually? thx
0
votes
0 answers

The epochs of my GRU models are showing up multiple times and model training suddenly decreased significantly

I am training neural networks for my thesis and the output behaviour of my notebook has significantly changed. It seems like for the GRU model the epoch output is getting printed more than double. The training time of my LSTM model also…
0
votes
2 answers

How does it work a Multi-Layer GRU/LSTM in Pytorch

I'm trying to understand exactly how the calculation are performed in the GRU pytorch class. I'm having some troubles while reading the GRU pytorch documetation and the LSTM TorchScript documentation with its code implementation. In the GRU…
0
votes
1 answer

Input and output shape to GRU layer in PyTorch

I am getting confused about the input shape to GRU layer. I have a batch of 128 images and I extracted 9 features from each images. So now my shape is (1,128,9). This is the GRU…
Talha Anwar
  • 2,699
  • 4
  • 23
  • 62
0
votes
0 answers

Why does the default GRU implementation in pytorch and keras differ significantly?

After implementing my own GRU cell, I was trying to validate it with the default implementation available on pytorch and keras. My implementation was very close to pytorch but significantly different from keras. So, I first decided to compare the…
0
votes
0 answers

What would be the best possible way to learn the time series of a set of variables from the time series data of another set of varaiables?

I actually implemented this using GRU and it is causing dimension mismatch whenever I try to train the GRU with multiple sets of X (multivariate time series input) and Y (different multivariate time series output). X and Y are co-related and I…
0
votes
1 answer

Seq2seq trains with LSTM, but not with GRU: not enough values to unpack (expected 3, got 2)

I am trying to run seq2seq model and it works fine when I use LSTM as encoder/decoder, but it returns an error when I replace LSTM with GRU: ---> 14 encoder_outputs, state_h, state_c = encoder(encoder_inputs) 15 states = [state_h,…
0
votes
1 answer

mat1 and mat2 shapes cannot be multiplied for GRU

I am creating a GRU to do some classification for a project, and I'm relatively new to Pytorch and implementing GRUs. I know similar questions like this one have been answered already but I can't seem to bring the same solution over to my own…
S_G
  • 17
  • 7