pytensor
pytensor copied to clipboard
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
### Description These two are doing way too much. We should probably split more along the lines of how we listed #821 if not more fine-grained. * Elemwise (which DimShuffle...
## Description This PR does some cleanup and extends reduction rewrites. Check each commit for the individual changes. Summary: 1. Remove list of ALL_REDUCE. AFAICT the `tracks` machinery already handles...
### Description For historical reasons `pt.min` returns `pt.neg(pt.max(pt.neg(x)))`. This seems to have been the case mostly to avoid having to define `Min` Op and its gradient. There is a later...
> I don't think there is any reason to require wrt and p to be 1d. As long as wrt and p have the same shape(s) everything should be fine....
### Description vectorize_node implicitly assumes that whenever we want to vectorize a node, we will return a new node that has a 1-to-1 mapping with the original outputs, but this...
## Description https://scientific-python.org/specs/spec-0000/ * set `sphinx>=5.3` * set `numpy>=1.24` * set `scipy>=1.9` * set `filelock>=3.8` * set `setuptools>=63.0` * set `types-setuptools>=63.0` * set `pytest>=7.2` * set `pytest-mock>=3.9` * set `pygments>=2.13`...
### Description It's useful to know when `arange` or `eye` is in a graph, but if these have constant inputs they will be constant folded, and then we would need...
### Description This came up in #885. The following graph will raise at compile time, but not during graph construction: ``` x = tensor("x", shape=(None, 5, 3)) # We avoid...
I will sort out Shared Variables in a separate PR
## Description I can imagine this being very powerful for debugging or reasoning about rewrites? ```python import pytensor import pytensor.tensor as pt from pytensor.graph.fg import FunctionGraph from pytensor.graph.features import FullHistory...