cagatayyildiz / ODE2VAE

ODE2VAE: Deep generative second order ODEs with Bayesian neural networks
MIT License
121 stars 27 forks source link

V/S partition problem in minimal example #6

Closed wzx16 closed 1 year ago

wzx16 commented 1 year ago

Hi,

I have a question regarding this line: https://github.com/cagatayyildiz/ODE2VAE/blob/d34bb0dc5c5ab6d50d2add758a7a97ad5a0013d5/torch_ode2vae_minimal.py#L231 s is indexed with :q But here ds is indexed with q: instead https://github.com/cagatayyildiz/ODE2VAE/blob/d34bb0dc5c5ab6d50d2add758a7a97ad5a0013d5/torch_ode2vae_minimal.py#L224 Is this a typo? If not could you briefly explain what's wrong with my assumption? Thank you!

cagatayyildiz commented 1 year ago

Hello! No, there is no typo. z=[v,s] is an (ordered) concatenation of velocity and position; hence v,s = z[:,:,:q], z[:,:,q:]. Your second statement also follows the same since the time derivative of position is velocity: ds = v = z[:,:q].

wzx16 commented 1 year ago

Oh I see, thanks for pointing out