Commit 1f2dcab4 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fix

parent f3dea2e4
Pipeline #71392 passed with stages
in 27 minutes and 26 seconds
......@@ -231,8 +231,12 @@ class MetricGaussianKL(Energy):
else:
mymap = map(lambda v: self._hamiltonian(lin+v).metric,
self._samples)
self.unscaled_metric = utilities.my_sum(mymap)
self._metric = self.unscaled_metric.scale(1./self._n_eff_samples)
unscaled_metric = utilities.my_sum(mymap)
if self._mirror_samples:
mymap = map(lambda v: self._hamiltonian(lin-v).metric,
self._samples)
unscaled_metric = unscaled_metric + utilities.my_sum(mymap)
self._metric = unscaled_metric.scale(1./self._n_eff_samples)
def apply_metric(self, x):
self._get_metric()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment