Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
xerus
xerus
Commits
3d956056
Commit
3d956056
authored
Aug 08, 2020
by
Philipp Trunschke
Browse files
server-updates
parent
7a8346a8
Pipeline
#2128
failed with stages
in 4 minutes and 12 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
3d956056
...
...
@@ -348,9 +348,9 @@ clean:
-
rm
-f
$(TEST_NAME)
-
rm
-f
include/xerus.h.gch
make
-C
doc clean
-
rm
xerus/libxerus_misc.so
-
rm
xerus/libxerus.so
-
rm
xerus/xerus.so
-
rm
-f
xerus/libxerus_misc.so
-
rm
-f
xerus/libxerus.so
-
rm
-f
xerus/xerus.so
...
...
include/xerus/applications/uqSALSA.h
View file @
3d956056
...
...
@@ -66,9 +66,9 @@ namespace xerus { namespace uq {
// Stagnation/Divergence parameters
double
minDecrease
=
1e-3
;
size_t
max
Iteration
s
=
1000
;
size_t
max
Sweep
s
=
1000
;
size_t
trackingPeriodLength
=
10
;
size_t
max
NonImprovingAlphaCycle
s
=
10
;
size_t
max
StagnatingEpoch
s
=
10
;
// Inactive rank parameters
size_t
kmin
=
2
;
...
...
@@ -81,11 +81,11 @@ namespace xerus { namespace uq {
// SALSA parameters
double
fomega
=
1.05
;
double
omega
_f
actor
=
1
;
double
omega
F
actor
=
1
;
// LASSO parameters
double
falpha
=
1.05
;
double
alpha
_f
actor
=
1
;
double
alpha
F
actor
=
1
;
std
::
vector
<
Tensor
>
basisWeights
;
/* // Reweighting parameters */
...
...
@@ -93,9 +93,14 @@ namespace xerus { namespace uq {
double
initialResidual
;
//TODO: rename
size_t
bestIteration
;
TTTensor
bestX
;
double
bestTrainingResidual
;
double
bestValidationResidual
;
struct
State
{
double
alpha
;
double
omega
;
TTTensor
x
;
double
trainingResidual
;
double
validationResidual
;
}
bestState
;
SALSA
(
const
TTTensor
&
_x
,
const
std
::
vector
<
Tensor
>&
_measures
,
const
Tensor
&
_values
);
void
run
();
...
...
src/xerus/applications/uqAdf.cpp
View file @
3d956056
...
...
@@ -308,11 +308,11 @@ namespace xerus { namespace uq { namespace impl_uqRaAdf {
Tensor
delta
(
x
.
get_core
(
_setId
).
dimensions
);
Tensor
dyadComp
,
tmp
;
#pragma omp declare reduction(+: Tensor: omp_out += omp_in) initializer(omp_priv = Tensor(omp_orig.dimensions))
if
(
_corePosition
>
0
)
{
const
Tensor
shuffledX
=
reshuffle
(
x
.
get_core
(
_setId
),
{
1
,
0
,
2
});
//TODO: schedule, threadprivate(dyadComp, tmp)
#pragma omp declare reduction(+: Tensor: omp_out += omp_in) initializer(omp_priv = Tensor(omp_orig.dimensions))
#pragma omp parallel for reduction(+: delta) firstprivate(_corePosition, _setId, dyadComp, tmp, shuffledX) default(none)
for
(
size_t
jIdx
=
0
;
jIdx
<
sets
[
_setId
].
size
();
++
jIdx
)
{
const
size_t
j
=
sets
[
_setId
][
jIdx
];
...
...
@@ -350,8 +350,6 @@ namespace xerus { namespace uq { namespace impl_uqRaAdf {
Tensor
shuffledX
=
x
.
get_core
(
_setId
);
shuffledX
.
reinterpret_dimensions
({
shuffledX
.
dimensions
[
1
],
shuffledX
.
dimensions
[
2
]});
//TODO: schedule, threadprivate(dyadComp, tmp)
#pragma omp declare reduction(+: Tensor: omp_out += omp_in) initializer(omp_priv = Tensor(omp_orig.dimensions))
#pragma omp parallel for reduction(+: delta) firstprivate(_corePosition, _setId, dyadComp, tmp, shuffledX) default(none)
for
(
size_t
jIdx
=
0
;
jIdx
<
sets
[
_setId
].
size
();
++
jIdx
)
{
const
size_t
j
=
sets
[
_setId
][
jIdx
];
...
...
src/xerus/applications/uqSALSA.cpp
View file @
3d956056
This diff is collapsed.
Click to expand it.
src/xerus/python/recovery.cpp
View file @
3d956056
...
...
@@ -155,6 +155,13 @@ void expose_recoveryAlgorithms(module& m) {
.
value
(
"Legendre"
,
uq
::
PolynomBasis
::
Legendre
)
;
class_
<
uq
::
SALSA
::
State
>
(
m
,
"uqSALSAState"
)
.
def_readonly
(
"alpha"
,
&
uq
::
SALSA
::
State
::
alpha
)
.
def_readonly
(
"omega"
,
&
uq
::
SALSA
::
State
::
omega
)
.
def_readonly
(
"x"
,
&
uq
::
SALSA
::
State
::
x
)
.
def_readonly
(
"bestTrainingResidual"
,
&
uq
::
SALSA
::
State
::
trainingResidual
)
.
def_readonly
(
"bestValidationResidual"
,
&
uq
::
SALSA
::
State
::
validationResidual
)
;
class_
<
uq
::
SALSA
>
(
m
,
"uqSALSA"
)
.
def
(
init
<
TTTensor
,
std
::
vector
<
Tensor
>
,
Tensor
>
())
...
...
@@ -162,25 +169,23 @@ void expose_recoveryAlgorithms(module& m) {
.
def_readwrite
(
"controlSetFraction"
,
&
uq
::
SALSA
::
controlSetFraction
)
.
def_readwrite
(
"targetResidual"
,
&
uq
::
SALSA
::
targetResidual
)
.
def_readwrite
(
"minDecrease"
,
&
uq
::
SALSA
::
minDecrease
)
.
def_readwrite
(
"max
Iteration
s"
,
&
uq
::
SALSA
::
max
Iteration
s
)
.
def_readwrite
(
"max
Sweep
s"
,
&
uq
::
SALSA
::
max
Sweep
s
)
.
def_readwrite
(
"trackingPeriodLength"
,
&
uq
::
SALSA
::
trackingPeriodLength
)
.
def_readwrite
(
"max
NonImprovingAlphaCycles"
,
&
uq
::
SALSA
::
maxNonImprovingAlphaCycle
s
)
.
def_readwrite
(
"max
StagnatingEpochs"
,
&
uq
::
SALSA
::
maxStagnatingEpoch
s
)
.
def_readwrite
(
"kmin"
,
&
uq
::
SALSA
::
kmin
)
.
def_readwrite
(
"maxRanks
;
"
,
&
uq
::
SALSA
::
maxRanks
)
.
def_readwrite
(
"maxRanks"
,
&
uq
::
SALSA
::
maxRanks
)
.
def_readwrite
(
"maxIRsteps"
,
&
uq
::
SALSA
::
maxIRsteps
)
.
def_readwrite
(
"IRtolerance"
,
&
uq
::
SALSA
::
IRtolerance
)
.
def_readwrite
(
"sparsityThreshold"
,
&
uq
::
SALSA
::
sparsityThreshold
)
.
def_readwrite
(
"fomega"
,
&
uq
::
SALSA
::
fomega
)
.
def_readwrite
(
"omega
_f
actor"
,
&
uq
::
SALSA
::
omega
_f
actor
)
.
def_readwrite
(
"omega
F
actor"
,
&
uq
::
SALSA
::
omega
F
actor
)
.
def_readwrite
(
"falpha"
,
&
uq
::
SALSA
::
falpha
)
.
def_readwrite
(
"alpha
_f
actor"
,
&
uq
::
SALSA
::
alpha
_f
actor
)
.
def_readwrite
(
"alpha
F
actor"
,
&
uq
::
SALSA
::
alpha
F
actor
)
.
def_readwrite
(
"basisWeights"
,
&
uq
::
SALSA
::
basisWeights
)
.
def_readonly
(
"initialResidual"
,
&
uq
::
SALSA
::
initialResidual
)
.
def_readonly
(
"bestIteration"
,
&
uq
::
SALSA
::
bestIteration
)
.
def_readonly
(
"bestX"
,
&
uq
::
SALSA
::
bestX
)
.
def_readonly
(
"bestTrainingResidual"
,
&
uq
::
SALSA
::
bestTrainingResidual
)
.
def_readonly
(
"bestValidationResidual"
,
&
uq
::
SALSA
::
bestValidationResidual
)
.
def_readonly
(
"bestState"
,
&
uq
::
SALSA
::
bestState
)
.
def
(
"run"
,
&
uq
::
SALSA
::
run
)
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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