Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for numpy.convolve() #644

Open
RoyiAvital opened this issue Sep 27, 2024 · 2 comments
Open

Add Support for numpy.convolve() #644

RoyiAvital opened this issue Sep 27, 2024 · 2 comments
Labels
PR welcome Contributions towards resolving this issue are welcome
Milestone

Comments

@RoyiAvital
Copy link

Since numpy.convolve() is a specific case of scipy.signal.convolve() could it be added?

@agriyakhetarpal agriyakhetarpal added the PR welcome Contributions towards resolving this issue are welcome label Sep 27, 2024
@agriyakhetarpal agriyakhetarpal added this to the v1.8.0 milestone Oct 15, 2024
@yaugenst-flex
Copy link
Contributor

yaugenst-flex commented Oct 15, 2024

We have a version of this here. Note that we didn't intend to make this match the numpy API, but it would be straightforward to do. The main difficulty was getting the padding modes to work correctly, and we went the route of just implementing the padding modes in a differentiable manner (see here), so this is not using any custom primitives.

Is the intent for autograd to only provide primitives + JVP/VJP definitions, or would contributions built on top of those also be welcome?

@j-towns
Copy link
Collaborator

j-towns commented Oct 16, 2024

Is the intent for autograd to only provide primitives + JVP/VJP definitions, or would contributions built on top of those also be welcome?

Our intent until now has just been to wrap the NumPy and SciPy APIs (and define their derivatives). I guess if there's a compelling reason to provide something else we could consider it.

On the original issue, I'm not sure why np.convolve isn't already supported, it shouldn't be too difficult to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR welcome Contributions towards resolving this issue are welcome
Projects
None yet
Development

No branches or pull requests

4 participants