aesara icon indicating copy to clipboard operation
aesara copied to clipboard

Prevent useless `DimShuffle`s produced by `TensorVariable.dimshuffle`

Open brandonwillard opened this issue 1 year ago • 0 comments

The DimShuffle in the following should not be produced:

import aesara
import aesara.tensor as at


x = at.scalar("x")
z = x.dimshuffle()

aesara.dprint(z)
# InplaceDimShuffle{} [id A]
#  |x [id B]

brandonwillard avatar Aug 23 '22 18:08 brandonwillard