Questions tagged [gated-recurrent-unit]

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

80 questions
0
votes
1 answer

Building a quick GRU model for stock prediction

I am beginner in RNNs and would like to build a running model gated recurrent unit GRU for stock prediction. I have a numpy array for the training data with this shape: train_x.shape (1122,20,320) `1122` represents the total amount timestamps I…
0
votes
1 answer

Mismatching dims in GRU for classification

I'm trying to complete a task and write simple RNN. Here's the class: class RNNBaseline(nn.Module): def __init__(self, vocab_size, embedding_dim, hidden_dim, output_dim, n_layers, bidirectional, dropout, pad_idx): …
0
votes
1 answer

Converting GRU layer from PyTorch to TensorFlow

I am trying to convert the following GRU layer from PyTorch(1.9.1) to TensorFlow(2.6.0): # GRU layer self.gru = nn.GRU(64, 32, bidirectional=True, num_layers=2, dropout=0.25, batch_first=True) I am unsure about my current implementation, especially…
0
votes
1 answer

Bidirectional GRU with 2x2 inputs

I am builduing a network, that splits strings into words, words into characters, embeds each character and then computes a vector represenation of this string by aggregating characters into words and words into string. Aggregation is performed with…
0
votes
1 answer

What is the input to the hidden layers of a multilayer RNN

This question makes most of it pretty clear. There's just one part I don't know the answer to yet... In the fig1 of this paper, is the input to deep layers the same input (i.e. x[t]) or is it the output from the previous layer? A really simple way…
0
votes
1 answer

Problem running GRU model; missing argument for forward()

I am working on a GRU and when I try to make predictions I get an error indicating that I need to define h for forward(). I have tried several things and ran out of patience after googling and scouring stack overflow for hours. This is the…
R Godbey
  • 76
  • 8
0
votes
1 answer

slot-filling intent-detection joint model

Hi everybody i have developed two RNN models for a chatbot.Let's say that user says:"Tell me how the weather will be tomorrow in Paris". The first model will be able to recognize the user's intent WEATHER_INFO , while the second one will be able to…
0
votes
2 answers

Which One is Faster either GRU or LSTM

I tried to implement a model on keras with GRUs and LSTMs. The model architecture is same for both the implementations. As I read in many blog posts the inference time for GRU is faster compared to LSTM. But in my case the GRU is not faster and…
0
votes
1 answer

Discrepancy between diagram and equations of GRU?

While I was reading the blog of Colah, In the diagram we can clearly see that zt is going to ~ht and not rt But the equations say otherwise. Isn’t this supposed to be zt*ht-1 And not rt*ht-1. Please correct me if I’m wrong.
vipul petkar
  • 79
  • 1
  • 10
0
votes
1 answer

stacked GRU model in keras

I am willing to create a GRU model of 3 layers where each layer will have 32,16,8 units respectively. The model would take analog calue as input and produce analog value as output. I have written the following code: def getAModelGRU(neuron=(10),…
Imran
  • 89
  • 2
  • 10
0
votes
2 answers

GRU Language Model not Training Properly

I’ve tried reimplementing a simple GRU language model using just a GRU and a linear layer (the full code is also at https://www.kaggle.com/alvations/gru-language-model-not-training-properly): class Generator(nn.Module): def __init__(self,…
alvas
  • 115,346
  • 109
  • 446
  • 738
0
votes
1 answer

How to implement 1-sigmoid in Keras?

As I want to implement a structure which is similar to the update gate of GRU: ht = (1-zt)ht-1 + ztht And I am trying to implement it with these code but it doesn't work. I am sure the problem are in the following code: one = K.ones(shape=(1, len,…
0
votes
1 answer

how does LSTM and GRU gates decide which word to keep in the memory

the update gate in a GRU decides which word to keep in the cell or to be clear what is the cell state. how does the update gate in gru decide when to be close to 1 and when to be close to 0? Basically, how does it decide to keep a word and not to…
0
votes
1 answer

Tensorflow/LSTM machanism: How to specify the previous output of first time step of LSTM cells

Just started using TensorFlow to build LSTM networks for multiclass classification Given the structure shown below: A RNN model Let's Assume each node A represents TensorFlow BasicLSTMcell. According to some popular examples found online, the input…
0
votes
0 answers

timestep issue in sentiment analysis using Keras's GRU

I will try to explain my problem as clearly as possible. So, I am trying to learn product information of reviews using GRU. I have about a million reviews, all of them converted to 300 dimensional vectors. These review vectors are grouped by their…
ntstha
  • 1,187
  • 4
  • 23
  • 41