Vectorization and promotion #13149
Replies: 2 comments 4 replies
-
Hi - this is a very confusing error message, but the issue comes from the fact that your It's hard to tell exactly what to recommend as a fix without being able to run the code and know a bit more about your intent, but I would start there. |
Beta Was this translation helpful? Give feedback.
-
I have two quick follow-up questions when you have a chance.
Thanks so much for all of the help! I really appreciate the advice that you gave so far. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
When I run my code I get the following error message.
I'm not exactly sure what is going on so any help would be appreciated. In particular, I don't know what the arity mismatch means.
Second, and perhaps relatedly, sometimes in vmapped functions when running over a batch, python sometimes promotes to (1,1,2,4) and sometimes to (1,2,4). I've tried tracing back the source of this consistency with no success, especially as once I check for it and everything passes I run into the arity error.
The relevant portion of the function where the error occurs is given by the last line of the following code:
Finally, the function with jax value and grad is given by:
Any suggestions would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions