-
Notifications
You must be signed in to change notification settings - Fork 131
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
Passing in multiple arguments #137
Comments
Thanks for the Q! The Using a |
A |
Update here, |
Hi, I have similar needs when coding my repo based on torchdyn. I need the function of odeint to support passing some data type as (dx, dlog(x)) for building generative models such as a continuous normalizing flow. The variable of x should be tensor of any shape, while dlog is simply a scalar. Temporarily, it seems that I have to turn back to torchdiffeq, which accepts tuple data type input. I suggest torchdyn to support tree-like tensor data type input. One of the implementation is https://github.com/opendilab/treevalue. |
Additional Description
I have a network I wish to train
f(x, x_dot, theta)
wherex
andx_dot
are the inputs,theta
are the network weights. This is a slightly odd problem sincex_dot
is the corrupted derivative ofx
and I wish to train a network to give me the correctx_dot
. To solve the ODE, I need to pass inx
att=0
but the network itself doesn't usex
in its forward pass, onlyx_dot
.How would I pass in multiple arguments like this to a
NeuralODE
in torchdyn? I am guessing the way to do this is to concatenate the two so I getx_x_dot = torch.cat((x, x_dot))
but I am not sure if this is correct.In
torchdiffeq
, what I did was call the solver like sowhat would be the equivalent approach in
torchdyn
?The text was updated successfully, but these errors were encountered: