-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequence outputs from Neural ODE (similar to 'many to many' RNN)? #40
Comments
Yep, that looks good to me, with one exception: you want Incidentally you may find a variety of other resources interesting:
Hope that helps! |
Thank you for your kind comments!! At first, I think X.grid_points (or X._t) represents scaled time values, such as 0.2, 0.5, or other floats from predetermined range,
I want to change t as scaled time values (e.g. [0, 0.05, 0.35, 0.44, ... ]), but I also found the note in this code is like below, which warns against using t argument If I want to use neural CDEs.
In the example code in "https://github.com/patrick-kidger/torchcde/blob/master/example/irregular_data.py", time information was included in the first variable of pseudodata x (x.shape = n_batch, n_sequence, n_variables). Time variable is not specially treated in the example code, and incrementally increasing integers are used for X.grid_points. Is it okay that time variable is simply included in the data column without any specification? (model do not know which column is time variable). |
Have a read of Section 3.2.1.3 of On Neural Differential Equations. The rest of Chapter 3 might also be helpful for context. |
Hi, Patrick!
I'm currently training irregularly sampled data, and previously I used many to many RNN for modeling.
When time-series data is sampled at the time of t1, t2, t3, and t4, my intended model will predict matched outcomes, y1, y2, y3, and y4.
And I want my model not to know the future sequence data.
For example, when predicting at the time of t2, the model should not know the information of t3 and t4 and it should yield the same result even though the information of t3 and t4 will change.
My previous code of RNN is like below:
L_LSTM = nn.LSTM(n_hidden, n_hidden, batch_first=True)
sequences_l, _ = L_LSTM(X, (state_h, state_c)) # sequences_l.shape => n_batch, n_sequence, n_hidden
I recently found this article, neural ODE, and I'm really interested in its amazing concepts.
Because my dataset is severely irregularly sampled, neural ODE seems to improve the model performance.
I want to apply neural ODE to my dataset instead of RNN, but I'm not pretty sure whether my code is right or not.
Example code in README.md is like below:
zt = torchcde.cdeint(X=X, func=self.func, z0=z0, t=X.interval)
zT = zt[..., -1, :] # get the terminal value of the CDE, zT.shape => n_batch, n_hidden
and I want to change this code like below:
sequences_t = torchcde.cdeint(X=X, func=func, z0=z0, t=X._t) # sequences_t.shape => n_batch, n_sequence, n_hidden
(X._t represents all time sequences according to my best knowledge)
Does it make sense to change codes like that? Will sequences_t act like sequences_l (from RNN code)?
Thanks in advance!
The text was updated successfully, but these errors were encountered: