Skip to content

Exporting to sympy, pytorch, jax for template model #857

Discussion options

You must be logged in to vote

Sorry, they are unfortunately incompatible. The reason is that a template expression allows for any Julia code within the template (even if-statements, while-loops, external library calls, storage, etc.), so one would need to create an entire translation library between Julia and SymPy just to make this work generally.

For simple expressions, it might be possible, but we made the choice to avoid adding the functionality, because it might result in some silent bugs if we have such a feature. I think the safest route is to translate it to SymPy manually.


Edit: I guess, maybe one route is to allow the user to define a sympy_expression_spec or something? Then the user would be responsible fo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikhmed-nabiev
Comment options

Answer selected by mikhmed-nabiev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants