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.
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.