pymc-devs / pytensor

PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.

Home Page:https://pytensor.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move constants inside OpFromGraph and remove unused inputs/outputs

ricardoV94 opened this issue · comments

Description

If we only have on instance of the same OpFromGraph Op we should move constant inputs inside, to allow a simpler internal graph at compilation time.

We shoud also remove any unused inputs/outputs. This was already noted as a todo in the the docstrings:

- Add optimization to removing unused inputs/outputs