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

Using numpy.tensordot for Conv2D #57

Open
tetrahydra opened this issue Aug 2, 2020 · 1 comment
Open

Using numpy.tensordot for Conv2D #57

tetrahydra opened this issue Aug 2, 2020 · 1 comment

Comments

@tetrahydra
Copy link

From this link:
https://stackoverflow.com/questions/56085669/convolutional-layer-in-python-using-numpy

and

https://numpy.org/doc/stable/reference/generated/numpy.tensordot.html

Z = np.tensordot(X_pad, weights, axes=3) + self.bias

Does this function is more relevant that using im2col?

@ddbourgin
Copy link
Owner

Oh, interesting! Thanks for the tip - I'll need to look into this, but it looks like it could be much cleaner :) I'm pretty busy these days, so if you're impatient and would like to submit a PR, I'd be happy to consider it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants