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
Changes to admm and svmbir wrapper to address issue #57 #88
Conversation
…Loss uses this argument as well.
Does this address all of the remaining check boxes (other than the PGM one) in #57? |
This doesn't contain the tests for CG and SVMBIRWeightedSquaredL2Loss. |
Recent changes in |
Added some tests for the new proxes in
Added some tests for the proxes in 53713dd. Not enough. |
@@ -111,7 +143,9 @@ def _bproj_hcb(self, y): | |||
|
|||
|
|||
class SVMBIRWeightedSquaredL2Loss(WeightedSquaredL2Loss): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That's a pretty big oversight. It needs to be fixed before we merge.
More generally, we should try to expand the workflow lint tests to catch cases like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Michael-T-McCann and @smajee : Could you look at the missing docstring issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 079ac16
@@ -40,6 +42,24 @@ def make_A(im, num_angles, num_channels): | |||
return A | |||
|
|||
|
|||
def cg_prox(f, v, λ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 72c77f8. Note slightly different way of handling the prox_kwargs because of changing variable names.
scico/linop/radon_svmbir.py
Outdated
max_iterations=self.prox_kwargs.get("maxiter"), | ||
stop_threshold=self.prox_kwargs.get("ctol"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the prox_kwargs dictionary entries are None
, this will cause it to use the svmbir defaults.
To get the scico defaults, need to set prox_kwargs={"maxiter": 1000, "ctol": 0.001} or not set prox_kwargs.
This may be a little counterintuitive. @bwohlberg ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been resolved by adjusting our expectations of what it means to override or omit entries in the passed dictionary.
The dictionary is seen as a whole and thus omitting an entry is like saying use whatever default the underlying method has.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified this in 079ac16
@@ -91,7 +91,9 @@ | |||
ρ = 10 # ADMM penalty parameter | |||
σ = density * 0.26 # denoiser sigma | |||
|
|||
f = SVMBIRWeightedSquaredL2Loss(y=y, A=A, W=Diagonal(weights), scale=0.5) | |||
f = SVMBIRWeightedSquaredL2Loss( | |||
y=y, A=A, W=Diagonal(weights), scale=0.5, prox_kwargs={"maxiter": 5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really desirable that we just drop the default stopping tolerance here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would choose the tolerance to be 0 (or very) low so that always 5 iterations are being performed (unless there is really almost no change)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in a640fa7
``is_masked`` option defines a valid region for projection and updates. | ||
Pixels outside the valid region are not projected or updated during | ||
a reconstruction. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear what updates
and reconstruction
here refer too, since this class is just a Radon transform. Presumably it refers to the when the ParallelBeamProjector
is used with SVMBIRWeightedSquaredL2Loss
? If so, this should be clarified here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified in commit 219e5ed
Addresses issue #57
Overview of changes (Mike and Soumendu):