Skip to content
GitLab
Menu
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
ecedc71f
Commit
ecedc71f
authored
Jan 28, 2019
by
Martin Reinecke
Browse files
Merge branch 'cosm' into 'NIFTy_5'
Cosm See merge request ift/nifty-dev!204
parents
1a9b8429
ab3f1c2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/source/conf.py
View file @
ecedc71f
...
...
@@ -29,4 +29,6 @@ add_module_names = False
html_theme
=
"sphinx_rtd_theme"
html_logo
=
'nifty_logo_black.png'
exclude_patterns
=
[
'mod/modules.rst'
,
'mod/*version.rst'
]
exclude_patterns
=
[
'mod/modules.rst'
,
'mod/nifty5.git_version.rst'
,
'mod/nifty5.logger.rst'
]
docs/source/installation.rst
View file @
ecedc71f
...
...
@@ -14,12 +14,12 @@ Plotting support is added via::
pip3 install --user matplotlib
FFTW support is added via:
FFTW support is added via:
:
sudo apt-get install libfftw3-dev
pip3 install --user pyfftw
To actually use FFTW in your Nifty calculations, you need to call
To actually use FFTW in your Nifty calculations, you need to call
::
nifty5.fft.enable_fftw()
...
...
nifty5/minimization/metric_gaussian_kl.py
View file @
ecedc71f
...
...
@@ -57,10 +57,10 @@ class MetricGaussianKL(Energy):
Notes
-----
For further details see: Metric Gaussian Variational Inference
(in preparation)
(
FIXME
in preparation)
"""
def
__init__
(
self
,
mean
,
hamiltonian
,
n_samp
e
ls
,
constants
=
[],
def
__init__
(
self
,
mean
,
hamiltonian
,
n_sampl
e
s
,
constants
=
[],
point_estimates
=
None
,
mirror_samples
=
False
,
_samples
=
None
):
super
(
MetricGaussianKL
,
self
).
__init__
(
mean
)
...
...
@@ -75,7 +75,7 @@ class MetricGaussianKL(Energy):
met
=
hamiltonian
(
Linearization
.
make_partial_var
(
mean
,
point_estimates
,
True
)).
metric
_samples
=
tuple
(
met
.
draw_sample
(
from_inverse
=
True
)
for
_
in
range
(
n_samp
e
ls
))
for
_
in
range
(
n_sampl
e
s
))
if
mirror_samples
:
_samples
+=
tuple
(
-
s
for
s
in
_samples
)
self
.
_samples
=
_samples
...
...
Write
Preview
Supports
Markdown
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