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
ift
NIFTy
Commits
93f596a5
Commit
93f596a5
authored
May 18, 2020
by
Philipp Arras
Browse files
Integrate into tests
parent
a79fd6a2
Pipeline
#75201
passed with stages
in 8 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_kl.py
View file @
93f596a5
...
...
@@ -15,9 +15,11 @@
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import
nifty6
as
ift
from
numpy.testing
import
assert_
,
assert_allclose
import
pytest
from
numpy.testing
import
assert_
,
assert_allclose
import
nifty6
as
ift
from
.common
import
setup_function
,
teardown_function
pmp
=
pytest
.
mark
.
parametrize
...
...
@@ -37,6 +39,7 @@ def test_kl(constants, point_estimates, mirror_samples, mf):
import
numpy
as
np
lh
=
ift
.
GaussianEnergy
(
domain
=
op
.
target
,
sampling_dtype
=
np
.
float64
)
@
op
ic
=
ift
.
GradientNormController
(
iteration_limit
=
5
)
ic
.
activate_and_reset_logging
()
h
=
ift
.
StandardHamiltonian
(
lh
,
ic_samp
=
ic
)
mean0
=
ift
.
from_random
(
'normal'
,
h
.
domain
)
...
...
@@ -48,6 +51,7 @@ def test_kl(constants, point_estimates, mirror_samples, mf):
point_estimates
=
point_estimates
,
mirror_samples
=
mirror_samples
,
napprox
=
0
)
ic
.
pop_history
()
locsamp
=
kl
.
_local_samples
klpure
=
ift
.
MetricGaussianKL
(
mean0
,
h
,
...
...
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