Add some minor features and bug fixes that I found when writing a new example script for ptychography reconstruction.
Approach
These fixes are all adhoc. Please see the commit messages and view changes one commit at a time for details.
Adding adaptive moment to DM deserves more explanation. Since DM does not have a conventional gradient based update, I added momentum by computing the update direction manually with a diff between the current and previous state of the variable. This allows tracking of a boosting directions that are updated more often.
Pre-Merge Checklists
Submitter
[x] Write a helpfully descriptive pull request title.
[x] Organize changes into logically grouped commits with descriptive commit messages.
[x] Document all new functions.
[x] Click 'details' on the readthedocs check to view the updated docs.
[ ] Write tests for new functions or explain why they are not needed.
[x] Address any complaints from pep8speaks.
Reviewer
[x] Actually read all of the code.
[x] Run the new code yourself; the included tests should make this easy.
[x] Write a summary of the changes as you understand them.
Purpose
Add some minor features and bug fixes that I found when writing a new example script for ptychography reconstruction.
Approach
These fixes are all adhoc. Please see the commit messages and view changes one commit at a time for details.
Adding adaptive moment to DM deserves more explanation. Since DM does not have a conventional gradient based update, I added momentum by computing the update direction manually with a diff between the current and previous state of the variable. This allows tracking of a boosting directions that are updated more often.
Pre-Merge Checklists
Submitter
Reviewer