You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was the case in the times of Theano, and they mention Elemwise specifically.
In Aesara, the Elemwise.infer_shape was eventually modified to validate shape information when we moved towards dynamic broadcasting (see brandonwillard/aesara@064e72f)
Although the two issues need not be related, the implementation logic changes depending which view we want to take.
This is how the optimized compiled graph for an addition shape looks like:
This issue cropped up in the implementation of AdvancedSubtensor.infer_shape, which originally did not support the boolean index case because of this? aesara-devs/aesara#39
In that case the argument against boolean index in particular didn't seem relevant, because advanced integer indexing can also be invalid:
importpytensor.tensorasptx=pt.vector("x")
x[[0, 20, 0]].shape.eval({x: [0, 1, 2]}) # [3], but there is no valid entry at position 20
According to the documentation: infer_shape implementations do not generally assert the inputs are valid: https://pytensor.readthedocs.io/en/latest/tutorial/shape_info.html#problems-with-shape-inference
This was the case in the times of Theano, and they mention Elemwise specifically.
In Aesara, the
Elemwise.infer_shape
was eventually modified to validate shape information when we moved towards dynamic broadcasting (see brandonwillard/aesara@064e72f)Although the two issues need not be related, the implementation logic changes depending which view we want to take.
This is how the optimized compiled graph for an addition shape looks like:
This issue cropped up in the implementation of
AdvancedSubtensor.infer_shape
, which originally did not support the boolean index case because of this? aesara-devs/aesara#39In that case the argument against boolean index in particular didn't seem relevant, because advanced integer indexing can also be invalid:
But it touches on the very same question!
Originally posted by @ricardoV94 in #329 (comment)
The text was updated successfully, but these errors were encountered: