Replies: 1 comment
-
This doesn't make sense if dims are symbolic, xtensor creates a root variable, which by definition cannot have any symbolic inputs. If you want symbolic dims you would need something more like a One parallel we have is with Regarding uses of having symbolic dims, and the The typos can be prevented by using python variables. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Just a couple of thoughts regarding #1411.
The current implementation uses strings to identify a dimension. But maybe in the static graph framework of pytensor it would make more sense to think of them as first class objects, so that they can have their own graph-like structure? Maybe they could be a different subclass of
Variable
as well? I think that might lead to cleaner code for users (no typos in dimension names that lead to silent broadcasting and gigantic arrays with an out-of-memory error), and it might also make derived dimensions easier to handle and reason about?I think we could do something like
Final usage could maybe be something like this?
Beta Was this translation helpful? Give feedback.
All reactions