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
Neel Shah
NIFTy
Commits
fdcda8cc
Commit
fdcda8cc
authored
Jun 11, 2021
by
Philipp Arras
Browse files
Fix test
parent
fef8ef1e
Changes
1
Show whitespace changes
Inline
Side-by-side
test/test_kl.py
View file @
fdcda8cc
...
@@ -133,8 +133,7 @@ def test_ParametricVI(mirror_samples, fc):
...
@@ -133,8 +133,7 @@ def test_ParametricVI(mirror_samples, fc):
assert_allclose
(
true_val
.
val
,
kl
.
value
,
rtol
=
0.1
)
assert_allclose
(
true_val
.
val
,
kl
.
value
,
rtol
=
0.1
)
samples
=
model
.
KL
.
samples
()
samples
=
model
.
KL
.
samples
()
mini
=
ift
.
SteepestDescent
(
ift
.
GradientNormController
(
iteration_limit
=
3
))
model
.
minimize
(
ift
.
ADVIOptimizer
(
ift
.
GradientNormController
(
iteration_limit
=
3
)))
model
.
minimize
(
mini
)
samples1
=
model
.
KL
.
samples
()
samples1
=
model
.
KL
.
samples
()
for
aa
,
bb
in
zip
(
samples
,
samples1
):
for
aa
,
bb
in
zip
(
samples
,
samples1
):
ift
.
extra
.
assert_allclose
(
aa
,
bb
)
ift
.
extra
.
assert_allclose
(
aa
,
bb
)
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