AdvancedPhotonSource / tike

Repository for ptychography software
http://tike.readthedocs.io
Other
29 stars 15 forks source link

REF: Actually copy parameters / Update convergence metric #275

Closed carterbox closed 1 year ago

carterbox commented 1 year ago

Purpose

Actually return a copy of the parameters classes when using the copy_to_device/copy_to_host functions. This prevents unexpected behavior when a parameter of one of these classes is modified in place.

Use a convergence metric that checks how much (absolutely) the object has changed since the last epoch.

Approach

Return a new instance of the Parameter classes from the copy_to functions instead of a reference to the original.

Pre-Merge Checklists

Submitter

Reviewer