Replies: 1 comment 1 reply
-
I can't think of any situation where |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
The question relates to the following scenario:
Is this a pattern that would ever be used by JAX? In that case the constructor of a custom PyTree class which accepts arrays as inputs would also need to be able to handle
ShapedArray
inputs (let's assume it handles concrete arrays and tracers of abstract arrays just fine).A relevant passage in this docs can be found here: https://jax.readthedocs.io/en/latest/pytrees.html#custom-pytrees-and-initialization, which warns against certain initialization code in custom PyTree classes:
But it doesn't mention the
ShapedArray
type explicitly or includes it in the example code for special handling:Beta Was this translation helpful? Give feedback.
All reactions