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 shape keyword to solvers #72

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Add shape keyword to solvers #72

wants to merge 3 commits into from

Conversation

nHackel
Copy link
Member

@nHackel nHackel commented Feb 1, 2024

This PR moves the shape keyword from various regularization terms into the solvers. Each solver defines a default shape which is essentially just the "default" vector derived from the operator. Before each prox! is being invoked the solver reshapes the solution according to the shape field.

During this PR we can also try to homogenize the reg. keywords related to the shape/dims #66

I am not 100% sure yet if this is the correct way to go. On the one hand it makes constructing the reg. terms easier and removes individual reshape calls. On the other hand certain reg. terms do require vec(x) for example to apply a linear operator, so we added new reshapes.

We also have different default behaviours for reg. terms. For example previously the TV reg. had a shape and a dims term, which defaulted to all dimensions. Now we can't easily give a default here, since we don't have the shape information during the construction, only during the prox! call. As a test I played around with nothing as a default and special logic. I think if we stick with it we should move to a new default, which just follows the solver default of assuming just one dimension.

@nHackel nHackel marked this pull request as draft February 1, 2024 17:31
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.

1 participant