33 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
41
views
Multivariate Time Series Modelling with GRU
we have 300 stores in a retail demand forecasting problem and we have 1 years of daily demand data, for some stores shorter. Using GRU to also model the extreme cases but the problem is how to feed ...
0
votes
1
answer
58
views
None Gradients for a model with 2 outputs
I have a model that has a GRU implementation inside and process audio samples. In each forward path I process a single sample of an audio file. To imitate the GRU behavior correctly, I have returned ...
0
votes
1
answer
73
views
Why are the outputs from PyTorch and TensorFlow GRU layers not equivalent?
I'm trying to port a trained Multi-cell GRU model in TensorFlow 1.x to PyTorch because I want to combine the encoder with some other, more advanced PyTorch modules. I managed to extract the weights to ...
1
vote
1
answer
41
views
can anyone explain h_n output of gru layer?
I am new to pytorch, have started coding from one month.
this is my gru code
hidden_size = 32
gru_layers_count = 2
encoder = nn.GRU(hidden_size,
hidden_size,
...
0
votes
1
answer
81
views
Implementation of Pass2Edit to model string edit behaviour
I am trying to implement Pass2Edit (this paper: read 3.1, 3.2). It takes in original password and current password strings, and tries to model the edit behaviour. The following is what it looks like:
...
2
votes
2
answers
205
views
Why the output and hidden state of last layer returned by GRU are not the same
Okay, here is the document of Pytorch, GRU return 2 variables:
output has a shape of (N,L,D∗Hout)(N,L,D∗Hout) containing the output features (h_t) from the last layer of the GRU, for each t.
hidden ...
0
votes
1
answer
40
views
Why Keras Input behaves differently than a regular tensor
I have an embedding layer and a GRU layer in Keras as following:
embedding_layer = tf.keras.layers.Embedding(5000, 256, mask_zero=True)
gru_layer = tf.keras.layers.GRU(256, return_sequences=True, ...
0
votes
0
answers
182
views
Initializing Hidden State for GRU RNN using feed forward neural network
I saw a paper where someone was able to initialize the hidden state of a RNN by using a feed forward NN. I was trying to figure out how this could by done but keep getting error messages while ...
-2
votes
1
answer
543
views
Lack of Variability in Predictions from Multivariate LSTM Model
I've been working on a multivariate LSTM model for time series forecasting, but I'm encountering an issue where the predicted output doesn't exhibit enough variability or 'ups and downs'. The ...
1
vote
0
answers
223
views
SeLU Activation Function Implementation In GRUCell PyTorch C++
The actual task is to replace the tanh_() at line#799 with SeLU activation function in new_gate of gru_cell. The following code block is the RNN.cpp file from PyTorch github repo.
template <...
1
vote
0
answers
141
views
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 ...
0
votes
1
answer
667
views
How to use GridSearchCV to do hyperparameter tuning with a custom estimator and custom cross validation?
I am learning how to apply GRU to a time series data but found unable to solve this problem on my own.
import time
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pandas ...
1
vote
1
answer
141
views
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 ...
0
votes
1
answer
146
views
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 ...
0
votes
1
answer
147
views
Reshape Input for GRU
train_data.shape
(11458167, 10)
# define the input shape
feature_num=10 # number of features
timesteps=1
# Reshape the input to shape (num_instances, timesteps, num_features)
train_data_reshaped = ...