pytensor
pytensor copied to clipboard
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
We have some other rewrites that will push Alloc below Elemwise, so that we don't compute on repeated inputs, but this won't happen if there's an expand_dims in the way....
### Description Reshape has only two inputs, x, and a vector of the output shape. This is cumbersome because many times we want to analyze the individual dimensions to rewrite...
### Describe the issue: I followed the example described here: https://pytensor.readthedocs.io/en/latest/library/d3viz/index.html I did not change any line of the example code provided and everything executes fine (including the installation of...
## Description Spin off from #842 aiming to remove the custom frozendict implementation. Although [it might be the case one day](https://peps.python.org/pep-0603/), there is currently no frozendict implementation in Python. A...
### Description We could add a method to the Ops, similar to infer_shape that infers the number of flops and memory usage of an Op given its inputs and input...
### Description For discoverability. We can raise `NotImplementedError` by default. Or create a subclass of ShapedOp?
### Description Failed in https://github.com/pymc-devs/pytensor/actions/runs/9712864428/job/26808478897?pr=871#step:6:3845 May need a seed?
### Description We are defaulting to the numpyro implementation when that's installed, but the numpyro implementation is incredibly wasteful for large N, as it consists of doing n Categorical draws...
### Description Brought up in https://github.com/pymc-devs/pytensor/pull/858 ```python import pytensor import pytensor.tensor as pt a = pt.matrix("a", shape=(200, 300)) b = pt.matrix("b", shape=(300, 400)) dot = (a[:, :, None] * b).sum(1)...