pytensor
pytensor copied to clipboard
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
## Description PyTensor uses `DisconnectedType` and `NullType` variables to raise informative errors when users request gradients wrt to inputs that can't be computed. This is a problem for OpFromGraph which...
Ref: ## Description I don't actually know any C++ or have any idea if this is a sensible change. But it seems like it may fix some obscure errors on...
### Describe the issue: TL;DR: missing op for CAR on jax backend on PyMC requires small tweak to CAR logp, new jax op in PyTensor. If you try to use...
## Description 1. Add `dstack` and `column_stack` for stacking tensors. 2. Refactor function names - `horizontal_stack` to `hstack` - `vertical_stack` to `vstack` ## Related Issue - [x] Closes #585 ##...
The gradients of OpFromGraph seem a bit fragile. I saw the following failures: ## Multiple output ```python from pytensor.compile.builders import OpFromGraph import pytensor.tensor as at x, y = at.scalars("x", "y")...
### Description ```python import numpy as np import pytensor.tensor as pt x = pt.tensor("x", shape=(0, 2)) pt.logsumexp(x).eval({x: np.zeros((0, 2))}) # ValueError: Input of CAReduce{maximum} has zero-size on axis %d ```...
## Description Created a new branch and added `grad_not_implemented` for a helpful error message ## Related Issue - [ ] Related to #711 ## Checklist - [x] Checked that [the...
### Description When grad fails because a specific Op doesn't support it it's quite difficult to figure out which one it was without jumping on an interactive debugger https://discourse.pymc.io/t/avoiding-non-nuts-samplers-when-broadcasting-a-multiplication-operation/14245/4?u=ricardov94 We...
### Description We have a `local_0_dot_x` that removes useless dots with zero'd inputs. We don't seem to have anything for dots with ones as reported in https://github.com/pymc-devs/pytensor/discussions/637#discussioncomment-8405862 ```python import pytensor...