pytensor
pytensor copied to clipboard
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
### Description [This blog post ](https://www.johndcook.com/blog/2010/01/19/dont-invert-that-matrix/ )makes an important point about speed in cases where we want to repeatedly compute $A^{-1}b$ -- we should factorize the `A` matrix once, then...
### Description We release frequently enough that I believe it's feasible to have upper and lower bounds for all direct dependencies. This will help prevent breakage that sometimes comes with...
### Description Getting this on both OSX and ubuntu 22.04 ``` Downloading pytensor-2.17.1.tar.gz (3.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 15.0 MB/s eta 0:00:00 Installing build dependencies ... error error: subprocess-exited-with-error ×...
Reported in https://discourse.pymc.io/t/shape-issue-with-custom-logp-in-densitydist/13608/5?u=ricardov94 ```python import numpy as np import pytensor import pytensor.tensor as pt x = pt.scalar("x") neg_const = pt.as_tensor(np.full((10,), -0.1)) out = neg_const + x pytensor.function([x], out) ``` ```...
I copied the JAX linker code and asked GPT to port the code to pytorch. Haven't tried it but maybe it's a good starting point for someone else.
### Description We're fairly close to having full Numba support, but a few important numba issues are missing. This is an incomplete list that we should complete and then make...
### Description https://numpy.org/doc/stable/reference/generated/numpy.linalg.multi_dot.html# The helper should just use pytensor dot/ matmul under the hood while matching the call signature of numpy. The fun part is to add a graph rewriter...
Implementation of `WalkingNestedGraphRewriter` which can apply node_rewriter for nodes of nested graphs (`Scan` and `OpFromGraph`). Close #529.
### Description RandomState are legacy in numpy and we can save some complexity by letting go of them in PyTensor. We were "obliged" to keep them because that's the only...
### Before Currently, this graph has valid gradients with respect to `mu` and `sigma`: ```python mu = pt.dscalar('mu') sigma = pt.dscalar('sigma') epsilon = pt.random.normal(0, 1) z = mu + sigma...