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
e66e8b5e
Commit
e66e8b5e
authored
Mar 25, 2020
by
Martin Reinecke
Browse files
cosmetics
parent
1f2dcab4
Pipeline
#71405
passed with stages
in 17 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/minimization/metric_gaussian_kl.py
View file @
e66e8b5e
...
...
@@ -257,7 +257,7 @@ class MetricGaussianKL(Energy):
res
=
res
+
tuple
(
-
item
for
item
in
res
)
return
res
def
_unscaled
_metric_sample
(
self
,
from_inverse
=
False
,
dtype
=
np
.
float64
):
def
_metric_sample
(
self
,
from_inverse
=
False
,
dtype
=
np
.
float64
):
if
from_inverse
:
raise
NotImplementedError
()
lin
=
self
.
_lin
.
with_want_metric
()
...
...
@@ -269,7 +269,4 @@ class MetricGaussianKL(Energy):
if
self
.
_mirror_samples
:
samp
=
samp
+
self
.
_hamiltonian
(
lin
-
v
).
metric
.
draw_sample
(
from_inverse
=
False
,
dtype
=
dtype
)
random
.
pop_sseq
()
return
_allreduce_sum_field
(
self
.
_comm
,
samp
)
def
_metric_sample
(
self
,
from_inverse
=
False
,
dtype
=
np
.
float64
):
return
self
.
_unscaled_metric_sample
(
from_inverse
,
dtype
)
/
self
.
_n_eff_samples
return
_allreduce_sum_field
(
self
.
_comm
,
samp
)
/
self
.
_n_eff_samples
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