SPDHG updates including to use the stochastic sampler - #1498
Closed
MargaretDuff wants to merge 115 commits into
Closed
SPDHG updates including to use the stochastic sampler #1498MargaretDuff wants to merge 115 commits into
MargaretDuff wants to merge 115 commits into
Conversation
Quick docstring Signed-off-by: Margaret Duff <[email protected]>
Member
Author
|
For discussion with @epapoutsellis, @jakobsj and @gfardell on 17/08/2023. |
…ate prob in spdhg
MargaretDuff
marked this pull request as ready for review
September 25, 2023 14:52
created herman_meyer sampling as a function of iteration number
Signed-off-by: Margaret Duff <[email protected]>
Co-authored-by: Edoardo Pasca <[email protected]> Signed-off-by: Margaret Duff <[email protected]>
…garet into stochastic_sampling
8 tasks
Signed-off-by: Margaret Duff <[email protected]>
MargaretDuff
marked this pull request as draft
January 9, 2024 16:25
Member
Author
|
Updated to include just updates to SPDHG:
|
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe your changes
-Allow SPDHG to take a sampler either from our sampler class or any class with a next(self) function
-Deprecated prob from SPDHG, taking the probabilities instead from the sampler class or from a new argument prob_weights, choosing the default [1/num_subsets]*num_subsets if one is not provided in either place.
-Created two setters for the step sizes. set_step_sizes_from_ratio resets the step sizes if the user provides one/both/none of gamma and rho. step_sizes_custom takes in one/both/none of sigma and tau allowing the user to use a custom sigma and tau with those not provided calculated from the defaults. Calculating sigma from tau probably needs checking with someone else.
-Added a check_convergence function that checks self._sigma[i] * self._tau * self.norms[i]**2 <= self.prob_weights[i] for all i. This probably needs checking with someone else.
-Deprecated the kwarg "norms" to be replaced by the set_norms method in BlockOperator: added a function to return a list of norms and the ability to set this list of norms BlockOperator: added a function to return a list of norms and the ability to set this list of norms #1513.
-Unit tests for SPDHG setters and convergence check
-Speed up of current SPDHG unit tests.
Describe any testing you have performed
Please add any demo scripts to CIL-Demos/misc/
Test with SPDHG https://github.com/TomographicImaging/CIL-Demos/blob/main/misc/testing_sampling_SPDHG.ipynb
Similar results gained for all samplers for SPDHG, with 10 subsets

With 80 subsets:

Link relevant issues
Part of the stochastic work plan. Closes #1575. Closes #1576. Closes #1500. Closes #1496
Checklist when you are ready to request a review
Contribution Notes
Please read and adhere to the developer guide and local patterns and conventions.