Commit cd97ea01 authored by David Frank's avatar David Frank
Browse files

Add some more logging to solvers

parent f74ae87f
...@@ -35,6 +35,7 @@ namespace elsa ...@@ -35,6 +35,7 @@ namespace elsa
iterations = _defaultIterations; iterations = _defaultIterations;
spdlog::stopwatch aggregate_time; spdlog::stopwatch aggregate_time;
Logger::get("CG")->info("Start preparations...");
// get references to some variables in the Quadric // get references to some variables in the Quadric
auto& x = _problem->getCurrentSolution(); auto& x = _problem->getCurrentSolution();
...@@ -64,6 +65,8 @@ namespace elsa ...@@ -64,6 +65,8 @@ namespace elsa
auto deltaNew = r.dot(d); auto deltaNew = r.dot(d);
auto deltaZero = deltaNew; auto deltaZero = deltaNew;
Logger::get("CG")->info("Preparations done, tooke {}s", aggregate_time);
Logger::get("CG")->info("epsilon: {}", _epsilon); Logger::get("CG")->info("epsilon: {}", _epsilon);
Logger::get("CG")->info("delta zero: {}", std::sqrt(deltaZero)); Logger::get("CG")->info("delta zero: {}", std::sqrt(deltaZero));
......
...@@ -34,6 +34,7 @@ namespace elsa ...@@ -34,6 +34,7 @@ namespace elsa
iterations = _defaultIterations; iterations = _defaultIterations;
spdlog::stopwatch aggregate_time; spdlog::stopwatch aggregate_time;
Logger::get("FISTA")->info("Start preparations...");
SoftThresholding<data_t> shrinkageOp{getCurrentSolution().getDataDescriptor()}; SoftThresholding<data_t> shrinkageOp{getCurrentSolution().getDataDescriptor()};
...@@ -55,6 +56,8 @@ namespace elsa ...@@ -55,6 +56,8 @@ namespace elsa
DataContainer<data_t> Atb = A.applyAdjoint(b); DataContainer<data_t> Atb = A.applyAdjoint(b);
DataContainer<data_t> gradient = A.applyAdjoint(A.apply(yPrev)) - Atb; DataContainer<data_t> gradient = A.applyAdjoint(A.apply(yPrev)) - Atb;
Logger::get("FISTA")->info("Preparations done, tooke {}s", aggregate_time);
Logger::get("FISTA")->info("{:^6}|{:*^16}|{:*^8}|{:*^8}|", "iter", "gradient", "time", Logger::get("FISTA")->info("{:^6}|{:*^16}|{:*^8}|{:*^8}|", "iter", "gradient", "time",
"elapsed"); "elapsed");
......
...@@ -33,6 +33,7 @@ namespace elsa ...@@ -33,6 +33,7 @@ namespace elsa
iterations = _defaultIterations; iterations = _defaultIterations;
spdlog::stopwatch aggregate_time; spdlog::stopwatch aggregate_time;
Logger::get("ISTA")->info("Start preparations...");
SoftThresholding<data_t> shrinkageOp{getCurrentSolution().getDataDescriptor()}; SoftThresholding<data_t> shrinkageOp{getCurrentSolution().getDataDescriptor()};
...@@ -48,6 +49,7 @@ namespace elsa ...@@ -48,6 +49,7 @@ namespace elsa
DataContainer<data_t> Atb = A.applyAdjoint(b); DataContainer<data_t> Atb = A.applyAdjoint(b);
DataContainer<data_t> gradient = A.applyAdjoint(A.apply(x)) - Atb; DataContainer<data_t> gradient = A.applyAdjoint(A.apply(x)) - Atb;
Logger::get("ISTA")->info("Preparations done, tooke {}s", aggregate_time);
Logger::get("ISTA")->info("{:^6}|{:*^16}|{:*^8}|{:*^8}|", "iter", "gradient", "time", Logger::get("ISTA")->info("{:^6}|{:*^16}|{:*^8}|{:*^8}|", "iter", "gradient", "time",
"elapsed"); "elapsed");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment