Closed mawbray closed 1 month ago
In case this is useful to anyone, I did some experiment in that direction some time ago in https://github.com/traversaro/experimental-jax-casadi/blob/main/exploration.ipynb . I quickly stopped as the jax primitive basically mirror the XLA one, so there are complex primitives like gather
that do not have direct casadi counterparts, and I was not able to emulate them properly in casadi. However, I would be really glad if someone was able to solve this problem.
Thanks @traversaro for pointing to some experiments you have done before!
@mawbray, I do not think the reverse is in the scope of our library, we will not implement it upon specific need. In case you need to embed your neural network trained with jax in casadi pipeline you may follow the similar approach as in l4casadi.
Thank you for the interest!
Love the translation and conversion from casADi to jax - thanks! Are there plans to enable the reverse (i.e. from jax to casADi)? This would be pretty functional for embedding JAX ML objects into e.g. NLP. In my opinion, this is something that takes a fair amount of effort through callbacks at the moment ...