Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
adfcaeb6
Commit
adfcaeb6
authored
Jan 23, 2019
by
Reimar H Leike
Browse files
now testing non-trivial part of SamplingEnabler and WienerFiltercurvature
parent
0ad8d58f
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_minimizers.py
View file @
adfcaeb6
...
...
@@ -86,7 +86,6 @@ def test_WF_curvature(space):
N
=
ift
.
DiagonalOperator
(
n
)
all_diag
=
1.
/
s
+
r
**
2
/
n
curv
=
ift
.
WienerFilterCurvature
(
R
,
N
,
S
,
iteration_controller
=
IC
,
iteration_controller_sampling
=
IC
)
m
=
curv
.
inverse
(
required_result
)
assert_allclose
(
m
.
local_data
,
...
...
@@ -96,6 +95,22 @@ def test_WF_curvature(space):
curv
.
draw_sample
()
curv
.
draw_sample
(
from_inverse
=
True
)
if
len
(
space
.
shape
)
==
1
:
R
=
ift
.
ValueInserter
(
space
,
[
0
])
n
=
ift
.
from_random
(
'uniform'
,
R
.
domain
)
+
0.5
N
=
ift
.
DiagonalOperator
(
n
)
all_diag
=
1.
/
s
+
R
(
1
/
n
)
curv
=
ift
.
WienerFilterCurvature
(
R
.
adjoint
,
N
,
S
,
iteration_controller
=
IC
,
iteration_controller_sampling
=
IC
)
m
=
curv
.
inverse
(
required_result
)
assert_allclose
(
m
.
local_data
,
1.
/
all_diag
.
local_data
,
rtol
=
1e-3
,
atol
=
1e-3
)
curv
.
draw_sample
()
curv
.
draw_sample
(
from_inverse
=
True
)
@
pmp
(
'minimizer'
,
minimizers
+
newton_minimizers
)
...
...
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