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
ift
NIFTy
Commits
92b55b1b
Commit
92b55b1b
authored
May 27, 2020
by
Philipp Arras
Browse files
Omit unneccesary copies
parent
a9d564b0
Pipeline
#75600
passed with stages
in 13 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/minimization/metric_gaussian_kl.py
View file @
92b55b1b
...
...
@@ -167,11 +167,11 @@ class MetricGaussianKL(Energy):
v
,
g
=
[],
[]
for
s
in
self
.
_local_samples
:
tmp
=
self
.
_hamiltonian
(
self
.
_lin
+
s
)
tv
=
tmp
.
val
.
val
_rw
()
tv
=
tmp
.
val
.
val
tg
=
tmp
.
gradient
if
self
.
_mirror_samples
:
tmp
=
self
.
_hamiltonian
(
self
.
_lin
-
s
)
tv
=
tv
+
tmp
.
val
.
val
_rw
()
tv
=
tv
+
tmp
.
val
.
val
tg
=
tg
+
tmp
.
gradient
v
.
append
(
tv
)
g
.
append
(
tg
)
...
...
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