Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 requirevec(x)
for example to apply a linear operator, so we added newreshapes
.We also have different default behaviours for reg. terms. For example previously the TV reg. had a
shape
and adims
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 theprox!
call. As a test I played around withnothing
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.