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
It may make sense to actually implement everything in terms of a correlate1d and have the convolve1dbe a call oncorrelate1dwith the flipped input. Since under the hood callingnp.convolve` is doing this flip anyway.
correlate1d shows up in the gradient of convolve1d (note the [::-1] inputs)
Description
This is what numpy.convolve uses under the hood, but we can avoid the python overhead in the C-backend: https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_Correlate2
It may make sense to actually implement everything in terms of a
correlate1d
and have the convolve1dbe a call on
correlate1dwith the flipped input. Since under the hood calling
np.convolve` is doing this flip anyway.correlate1d shows up in the gradient of convolve1d (note the [::-1] inputs)
pytensor/pytensor/tensor/signal/conv.py
Lines 68 to 71 in afb7695
The text was updated successfully, but these errors were encountered: