question about experimental/ode.py
#8337
Unanswered
mariogeiger
asked this question in
Q&A
Replies: 1 comment 4 replies
-
It looks like this has returned a scalar since it was first introduced to the JAX package: #1068 I'm not familiar enough with the logic here to know whether it should be an array. Perhaps @duvenaud could comment? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking at
experimental/ode.py
to change the error criteria and some thing surprised me.The function
error_ratio
clearly return the mean of the error ratio: an array of shape()
https://github.com/google/jax/blob/11127add2bab5bb963a1bacb7eca42559deea6bf/jax/experimental/ode.py#L131-L134
But then when it is used, it is used like if it was an array of ratios: the variable name has an s (
error_ratios
) and there is anjnp.all
as if the intent was to check that all the ratios were smaller than one.https://github.com/google/jax/blob/11127add2bab5bb963a1bacb7eca42559deea6bf/jax/experimental/ode.py#L198-L204
As another clue that
error_ratios
was a once list,optimal_step_size
contains ajnp.max
that has also no effects.https://github.com/google/jax/blob/11127add2bab5bb963a1bacb7eca42559deea6bf/jax/experimental/ode.py#L136-L139
Question: is this intentional? If so, can I propose a PR to clarify the code?
(Ideally I would like to propose a PR that would allow the user to optionally specify the function
error_ratio
)Beta Was this translation helpful? Give feedback.
All reactions