optim.PRIDUBlock#
- class bartorch.optim.PRIDUBlock#
Bases:
ModuleOne step of BART’s primal-dual iteration,
italgos.c’schambolle_pock.The data term is its own dual, updated through its resolvent, and so is every term but the first when that one’s transform is the identity: it becomes the primal step.
sigmaandtauaresqrt(step)times and oversigma_tau_ratio, divided witheigenby the root of the largest eigenvalue;hogwilddecays by 0.95 a step. Each step takes its ownsigmaandtauunlessadaptive_stepmoves them, and then the state carries them.doneis BART’s absolute tolerance on the two residuals. With a term that introduces auxiliary variables the state vector is the image followed by those variables, andoutput()returns the image alone.- start()#
The run’s state: the split
iter2_chambolle_pockmakes, zero duals, and the steps.
- forward()#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- output()#