Giter Club home page Giter Club logo

gru-d's People

Contributors

zhiyongc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gru-d's Issues

input size of grid function

Hello,
first of all, thanks for this repository.
in the main function, what is the reason for assigning grid input size as:

input_dim  = fea_size
hidden_dim = fea_size
output_dim = fea_size

shouldn't it be like this??

input_dim  = fea_size
hidden_dim = seq_len
output_dim = pred_len

Trainable decay scheme issue

GRU-D/GRUD.py

Line 120 in 9f877f8

x = mask * x + (1 - mask) * ( delta_x * x + (1 - delta_x) * x_mean)

Hi,
My understanding of Equation 11 in the GRU-D paper is that the two x values on the right side of this equation are supposed to be different values. I believe mask * x to be correct, as that is multiplying x of the current time step. However, I believe delta_x * x is incorrect, as this x should be the value of x most recently observed prior to the current time step t.

Hidden states sequence order

Just pointing out that hidden is appended to the left of the outputs variable, which reverses the order (on the time dimension) of the hidden states of the GRU.

Computing Time Interval Delta

Based on my understanding of the paper, the computing of time interval at time step t is based on the mask value of the previous time step t-1 [eq(2) in the paper].

It is looks like you compute time interval at time step t based on mask value at time step t

for idx in range(missing_index[0].shape[0]):
            i = missing_index[0][idx] # for 1st dim
            j = missing_index[1][idx] # for 2nd dim
            k = missing_index[2][idx] # for 3rd dim
            if j != 0:
                Delta[i,j,k] = Delta[i,j,k] + Delta[i,j-1,k] 

But, I think it suppose to be as follows:

for idx in range(missing_index[0].shape[0]):
            i = missing_index[0][idx] # for 1st dim
            j = missing_index[1][idx] # for 2nd dim
            k = missing_index[2][idx] # for 3rd dim
            if j != 0 and j!=9 :
                Delta[i,j+1,k] = Delta[i,j+1,k] + Delta[i,j,k]

Wrong GRU-D update functions

I think one update function is wrong.. on line 123 in GRUD.py your update equation is:

h_tilde = F.tanh(self.hl(combined))
h = (1 - z) * h + z * h_tilde

according to the paper, they should be

new_combined = torch.cat((x, torch.mul(r, h), m), dim=2)
h_tilde = F.tanh(self.hl(new_combined))
h = (1 - z)*h + z*h_tilde

When computing h_tilde in the GRU cell, you have to first multiply the hidden state with the reset gate.

Data Sources

Hi, thanks for your contributions. Could you tell where the data comes from? (speed_matrix_2015 and inrix_seattle_speed_matrix_2012)

Setting for gamma_h_l

Hi,

GRUD.py initializes the gamma_h_l by setting out_features = delta_size (line 108). It's ok in this code since the hidden_size is equal to input_size. However, should it be better to set out_features = hidden_size for other cases? In other words, I think it's better to use:

self.gamma_h_l = nn.Linear(self.delta_size, self.hidden_size)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.