ptyrad.solver.ptyrad_solver#
High-level solver interface for PtyRAD workflows, including “reconstruction” and “hypertune” modes
Classes
|
A wrapper class to perform ptychographic reconstruction or hyperparameter tuning. |
- class ptyrad.solver.ptyrad_solver.PtyRADSolver(params, device=None, seed=None, acc=None)[source]#
Bases:
objectA wrapper class to perform ptychographic reconstruction or hyperparameter tuning.
The PtyRADSolver class initializes the necessary components for ptychographic reconstruction and provides methods to execute the reconstruction or perform hyperparameter tuning using Optuna.
- params#
Dictionary containing all the parameters required for initialization, loss functions, constraints, model, and optional hyperparameter tuning.
- Type:
dict
- if_hypertune#
A flag to indicate whether hyperparameter tuning should be performed instead of regular reconstruction. Defaults to False.
- Type:
bool
- device#
The device to run the computations on (e.g., ‘cuda’ for GPU, ‘cpu’ for CPU). Defaults to None to let accelerate automatically decide.
- Type:
str
- init_initializer()[source]#
Initializes the variables and objects needed for the reconstruction process.