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] Use TN formulation of Dangel, 2023 to compute average patches #61

Merged
merged 3 commits into from
Nov 3, 2023

Conversation

f-dangel
Copy link
Owner

@f-dangel f-dangel commented Nov 2, 2023

Implements #60.

I added a test that ensures the TN formulation computes faster and uses less memory than the previous approach.
There are still more performance improvements possible for structured convolutions, but I first need to put more work into the einconv library's simplification mechanism before we can make those even faster and more memory-efficient.

Here is the output of the test case (CPU):

Memory used by inefficient function: 2537.1 MiB.
Memory used by efficient function: 1161.7 MiB.
Inefficient function took 1.09e+00 s
Efficient function took 5.12e-01 s

@f-dangel f-dangel requested a review from runame November 2, 2023 22:22
Copy link
Collaborator

@runame runame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think this is an exciting improvement.

singd/optim/utils.py Outdated Show resolved Hide resolved
@f-dangel f-dangel merged commit 40a11cf into main Nov 3, 2023
14 checks passed
@f-dangel f-dangel deleted the average-patches-tn branch November 3, 2023 14:43
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

Successfully merging this pull request may close these issues.

2 participants