Jit lookup of precomputed function #11346
-
I have bases functions that I am precomputing by discretizing the definition space [0,1] and storing it and its derivatives in a dictionary. During runtime, I want to lookup the value (and the value of the gradients) using this code
However, in line
because x is not static. Is there a way to get around this problem? Precomputing basis functions and looking them up seems to be a common thing to do. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use an |
Beta Was this translation helpful? Give feedback.
You can use an
jnp.array
as yourcached_bases_dict