Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IP
elsa
Commits
cd97ea01
Commit
cd97ea01
authored
Mar 17, 2022
by
David Frank
Browse files
Add some more logging to solvers
parent
f74ae87f
Changes
3
Hide whitespace changes
Inline
Side-by-side
elsa/solvers/CG.cpp
View file @
cd97ea01
...
...
@@ -35,6 +35,7 @@ namespace elsa
iterations
=
_defaultIterations
;
spdlog
::
stopwatch
aggregate_time
;
Logger
::
get
(
"CG"
)
->
info
(
"Start preparations..."
);
// get references to some variables in the Quadric
auto
&
x
=
_problem
->
getCurrentSolution
();
...
...
@@ -64,6 +65,8 @@ namespace elsa
auto
deltaNew
=
r
.
dot
(
d
);
auto
deltaZero
=
deltaNew
;
Logger
::
get
(
"CG"
)
->
info
(
"Preparations done, tooke {}s"
,
aggregate_time
);
Logger
::
get
(
"CG"
)
->
info
(
"epsilon: {}"
,
_epsilon
);
Logger
::
get
(
"CG"
)
->
info
(
"delta zero: {}"
,
std
::
sqrt
(
deltaZero
));
...
...
elsa/solvers/FISTA.cpp
View file @
cd97ea01
...
...
@@ -34,6 +34,7 @@ namespace elsa
iterations
=
_defaultIterations
;
spdlog
::
stopwatch
aggregate_time
;
Logger
::
get
(
"FISTA"
)
->
info
(
"Start preparations..."
);
SoftThresholding
<
data_t
>
shrinkageOp
{
getCurrentSolution
().
getDataDescriptor
()};
...
...
@@ -55,6 +56,8 @@ namespace elsa
DataContainer
<
data_t
>
Atb
=
A
.
applyAdjoint
(
b
);
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"
,
"elapsed"
);
...
...
elsa/solvers/ISTA.cpp
View file @
cd97ea01
...
...
@@ -33,6 +33,7 @@ namespace elsa
iterations
=
_defaultIterations
;
spdlog
::
stopwatch
aggregate_time
;
Logger
::
get
(
"ISTA"
)
->
info
(
"Start preparations..."
);
SoftThresholding
<
data_t
>
shrinkageOp
{
getCurrentSolution
().
getDataDescriptor
()};
...
...
@@ -48,6 +49,7 @@ namespace elsa
DataContainer
<
data_t
>
Atb
=
A
.
applyAdjoint
(
b
);
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"
,
"elapsed"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment