Questions tagged [gru]
41 questions
2
votes
1 answer
How to interpret get_weights for Keras GRU?
I am unable to interpret the results of get_weights from a GRU layer. Here's my code -
#Modified from - https://machinelearningmastery.com/understanding-simple-recurrent-neural-networks-in-keras/
from pandas import read_csv
import numpy as np
from…

desert_ranger
- 1,096
- 3
- 13
- 26
1
vote
0 answers
keras seq2seq with GRU instead of LSTM
I am trying to modify the code in https://keras.io/examples/nlp/lstm_seq2seq/ so it uses GRU instead of LSTM. I have managed to get it to train properly and have constructed the encoder-decoder model for inference using code from Implementing…

Duncan Leung
- 142
- 1
- 11
1
vote
1 answer
How can i improve my recurrent neural network
I want to implement a recurrent neural network for natural language inference. I'm new in this topic and this is a task from a module from my university, so i've had some code beforehand which i tried to adopt for this task. The problem i have is…

Felix Wernlein
- 19
- 2
1
vote
1 answer
How should I reshape my data to feed into pytorch GRU network?
I've been having problems getting my data to fit the dimensions required by pytorch GRU.
My input is a 256-long float vector, in bathes of 64, so the size of a batch tensor is [64, 256]
According to pytorch documentation, GRU takes input of size…

Hubert Rybka
- 13
- 3
1
vote
1 answer
What will be the effect of using 'break' statement within a 'for' in the torch forward module ? -- torch graph
I want to develop a GRU-based model for variant length input data. So I think I should use the while statement in the forward and then break it when all of the sequences were processed. Will it affect the torch graph? Does this disturb the network…

Alireza AR
- 11
- 1
1
vote
0 answers
Roberta with GRU is not training
I'm trying to fine-tune RoBERTa and integrate external knowledge via a BiGRU block. But the model is not learning (the train loss is around 0.8 and is not decreasing). There is no problem with the data, I tried some other RoBERTa-based models on the…

atlas
- 11
- 1
1
vote
0 answers
Implementations of the `GRU` cell is different from the descriptions
I need to put GRU cell for inference on certain hardware. And as I just found, definitions, available on Internet from multiple sources, for example, https://en.wikipedia.org/wiki/Gated_recurrent_unit, is not agree with cell implementations on both…

Alexey Birukov
- 1,565
- 15
- 22
1
vote
0 answers
training and validation losses decreasing slowly
i have implemented 2DCNN model followed by GRU layer
class CNN2D(nn.Module):
def __init__(self, img_x=88, img_y=88, fc_hidden1=512, fc_hidden2=512, drop_p=0.3, CNN_embed_dim=512,num_classes=9):
super(CNN2D, self).__init__()
…

sarah
- 11
- 3
1
vote
0 answers
MLP and LSTM in time series
Hope you are doing well,
I am doing a research paper about wind energy forecasting using deep learning. Where I used 3 neural networks namely: RNN, LSTM, MLP. The results were good, but the thing that I found somewhat strange is the superiority of…

Shamil
- 11
- 2
1
vote
0 answers
PyTorch pack_padded_sequence is extremely slow
I am building a GRU-based architecture. Before, I was just padding the batches of sequences and passing it to the GRU. Obviously, that was introducing some small error in the results because it's not quite the 100% correct thing to do (the GRU…

hologram
- 533
- 2
- 5
- 21
1
vote
0 answers
Keras GRU input shape
I have built a custom generator that outputs X data with shape (100,2,2048) belonging to Y 16 (16) classes to be passed to a GRU model for video classification.
100 is the sequence length, 2 is for 2 simultaneous camera views, each with 2048…

Hamzah Bawah
- 11
- 1
- 4
0
votes
0 answers
Function prediction of GRU
I have a question about the code I found on the internet, I hope you can help me
When I create a function to predict the values that are in x_test, I get values other than those obtained from :
lstm_predictions =…

Junior
- 1
- 1
0
votes
0 answers
Custom GRU implementation performing very slow
I am working on customizing the GRU layer to suit my specific requirements. To achieve this, I am implementing a custom GRU layer following the architecture and implementation of the GRU layer in Keras.
However, I noticed that when I experiment…

Bisnu Sarkar
- 1
- 1
0
votes
0 answers
My GRU Model performance is not working properly
I am trying to create a GRU Model to predict energy consumption. I have a 700k rows for my dataset that was resampled from seconds to per hour and that makes a final data of 720 rows. Upon trying to create the model, I haven't figured out what's…
0
votes
1 answer
An example usage for tf.keras.layers.GaussianDropout in TensorFlow2 for deep GRU network
There are not much example of using
tf.keras.layers.GaussianDropout
in TensorFlow 2, and I am just converting my code from Tensorflow1.15 to Tensorflow 2, and having some difficulty to understand the new way of coding in TF2.
So, can anyone please…

MK 5012
- 29
- 1
- 9