Closed
Description
Description
It seems some part of the shape inference for blockwise gives incorrect results:
import pytensor
import pytensor.tensor as pt
x = pt.tensor("x", shape=(19, 19))
q = np.random.randn(20, 19)
(q @ x).type
# TensorType(float64, shape=(19, 19))
This gives me (19, 19) on main, when it should be (20, 19).
If I wrap q
into a tensor variable I get the correct result:
import pytensor
import pytensor.tensor as pt
x = pt.tensor("x", shape=(19, 19))
q = pt.as_tensor_variable(np.random.randn(20, 19))
(q @ x).type
# TensorType(float64, shape=(20, 19))
Metadata
Metadata
Assignees
Labels
No labels