Handling tensor with variable length of dimension #728
Unanswered
kentarow-kawata
asked this question in
Q&A
Replies: 1 comment 7 replies
-
PyTensor This snippet creates a 3D tensor with dynamic shape on the leading dimension, and fixed shape of (5, 3) for the remaining dimensions. import pytensor.tensor as pt
x = pt.tensor("x", shape=(None, 5, 3)) |
Beta Was this translation helpful? Give feedback.
7 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.
-
Description
Hi PyTensor developpers,
I would like to work with pytensor to handle three dimensional arrays. The first and second dimensions are of fixed length, but the third dimension can have various lengths.
e.g.) 2 x 3 x n tensor
[ [ [0,1,2], [3,4], [5] ],
[ [6,7] , [8] , [9] ] ]
Is there any way to handle tensors with variable length of dimensions using pytensor? Or, is there any way to treat the example as a matrix with array data (numpy.array or list) as elements?
Beta Was this translation helpful? Give feedback.
All reactions