iPiano
An implementation of the iPiano algorithms for non-convex and non-smooth optimization.
|
Implementation of nmiPiano (algorithm 4) as proposed in [1]: [1] P. Ochs, Y. Chen, T. Brox, T. Pock. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization. SIAM J. Imaging Sciences, vol. 7, no. 2, 2014. More...
#include <nmipiano.h>
Classes | |
struct | Iteration |
Structure representing an iteration, passed as is to a callback function to be able to monitor process. More... | |
struct | Options |
Options of algorithm. More... | |
Public Member Functions | |
nmiPiano (const std::function< float(const Eigen::MatrixXf &)> f, const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &)> df, std::function< float(const Eigen::MatrixXf &)> g, const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &, float alpha)> prox_g, Options options, const std::function< void(const Iteration &)> callback=[](const Iteration &iteration) -> void{}) | |
Constructor. More... | |
~nmiPiano () | |
Destructor. | |
void | optimize (Eigen::MatrixXf &x_star, float &f_x_star) |
Optimize the given objective using the nmiPiano algorithm. More... | |
Static Public Member Functions | |
static void | silent_callback (const Iteration &iteration) |
Silent callback to use with nmiPiano. More... | |
static void | default_callback (const Iteration &iteration, int n=10) |
Default callback to use with nmiPiano. More... | |
static void | brief_callback (const Iteration &iteration, int n=10) |
Brief callback to use with nmiPiano. More... | |
static void | file_callback (const Iteration &iteration, const std::string &file) |
File callback, used to write all information to the specified file. More... | |
static void | plot_callback (const Iteration &iteration, const std::string &file) |
File callback for plotting, writes CSV output of format: iteration,f,g,alpha_n,L_n,Delta_n. More... | |
Protected Member Functions | |
void | initialize (Iteration &iteration) |
Initialize the iteration structure (i.e. set iteration 0): More... | |
float | estimateL (const Iteration &iteration) |
void | iterate (Iteration &iteration, float beta, Eigen::MatrixXf &x_np1) |
Do an iteration, i.e. compute x_np1. More... | |
bool | checkLipschitz (const Iteration &iteration, const Eigen::MatrixXf &x_np1) |
Check the lipschitz condition for backtracking. More... | |
Protected Attributes | |
std::function< float(const Eigen::MatrixXf &)> | f_ |
The smooth part of the objective function. | |
std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &)> | df_ |
Gradient of smooth part of the objective function (i.e. derivative). | |
std::function< float(const Eigen::MatrixXf &)> | g_ |
Convex, nonsmooth part of objective. | |
std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &, float)> | prox_g_ |
Proximal map for g, i.e. (I + alpha_n*g)^(-1). | |
std::function< void(const Iteration &)> | callback_ |
Callback, can e.g. be sued to monitor process using the provided information in the Iteration structure. | |
Options | options_ |
Options. | |
Implementation of nmiPiano (algorithm 4) as proposed in [1]: [1] P. Ochs, Y. Chen, T. Brox, T. Pock. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization. SIAM J. Imaging Sciences, vol. 7, no. 2, 2014.
Implementation of nmiPiano as described in [1] and [2]:
[1] P. Ochs, Y. Chen, T. Brox, T. Pock. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization SIAM Journal of Imaging Sciences, colume 7, number 2, 2014. [2] D. Stutz. Seminar paper "iPiano: Inertial Proximal Algorithm for Non-Convex Optimization" https://github.com/davidstutz/seminar-ipiano
The code is published under the BSD 3-Clause:
Copyright (c) 2016, David Stutz All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nmiPiano::nmiPiano | ( | const std::function< float(const Eigen::MatrixXf &)> | f, |
const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &)> | df, | ||
std::function< float(const Eigen::MatrixXf &)> | g, | ||
const std::function< void(const Eigen::MatrixXf &, Eigen::MatrixXf &, float alpha)> | prox_g, | ||
Options | options, | ||
const std::function< void(const Iteration &)> | callback = [](const Iteration &iteration) -> void { } |
||
) |
Constructor.
[in] | f | |
[in] | df | |
[in] | prox_g | |
[in] | callback |
|
static |
Brief callback to use with nmiPiano.
[in] | iteration |
|
protected |
Check the lipschitz condition for backtracking.
[in] | iteration | |
[in] | x_np1 |
|
static |
Default callback to use with nmiPiano.
[in] | iteration |
|
static |
File callback, used to write all information to the specified file.
[in] | iteration | |
[in] | file |
|
protected |
Initialize the iteration structure (i.e. set iteration 0):
[in] | iteration |
|
protected |
Do an iteration, i.e. compute x_np1.
[in] | iteration | |
[in] | beta | |
[out] | x_np1 |
void nmiPiano::optimize | ( | Eigen::MatrixXf & | x_star, |
float & | f_x_star | ||
) |
Optimize the given objective using the nmiPiano algorithm.
[out] | x_star | |
[out] | f_x_star |
|
static |
File callback for plotting, writes CSV output of format: iteration,f,g,alpha_n,L_n,Delta_n.
[in] | iteration | |
[in] | file |
|
static |
Silent callback to use with nmiPiano.
[in] | iteration |