Convolutions? #1008
Replies: 2 comments
|
There's an issue about adding it to array-api-extra: data-apis/array-api-extra#286 As for the "recommended"/performant way, SciPy roadmap has the convolution item (for a decade or so, predating anything array api ): https://docs.scipy.org/doc/scipy/dev/roadmap-detailed.html#signal This is to say, I think 1) some array agnostic function is a good fit for array-api-extra, and 2) an investigation of performance landscape across array sizes, array backends and hardware types would be a nice exercise. |
|
Convolution functions were discussed early on as a candidate for an extension. I think it'd be useful for someone to write a good summary of the current set of convolution functions out there and their overlap. I think the conclusion will be that the overlap is small, or more precisely, that there are different sets of commonality:
I think the deep learning style functions are potentially most interesting for an extension. I'd be interested to see how |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What is the recommended array API standard compatible way to compute a convolution?
To me it seems the options are to either use a for loop over the kernel, use ffts or use
scipy.signal.oaconvolvewhich seems to be compatible.None of these options are particularly performant for my use case.
Personally I'd be interested in something with which I could implement some of the filters found in
scipy.ndimageand discrete wavelet transforms in PyWavelets.There doesn't seem to have been any interest in convolutions being in the standard directly - I could only find this comment:
Many libraries include similarly named convolution functions:
jax has
jax.lax.conv_general_dilatedfor which the above functions seem to be special cases.Is this in scope for inclusion in the standard, potentially as an extension module?
All reactions