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
fa4aaa8d
Commit
fa4aaa8d
authored
Mar 28, 2018
by
Martin Reinecke
Browse files
try to fix
parent
6079d9bf
Pipeline
#26558
failed with stages
in 4 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/library/noise_energy.py
View file @
fa4aaa8d
...
...
@@ -26,7 +26,7 @@ class NoiseEnergy(Energy):
def
__init__
(
self
,
position
,
alpha
,
q
,
res_sample_list
):
super
(
NoiseEnergy
,
self
).
__init__
(
position
)
self
.
N
=
DiagonalOperator
(
exp
(
self
.
position
))
self
.
N
=
DiagonalOperator
(
exp
(
position
))
self
.
alpha
=
alpha
self
.
q
=
q
self
.
res_sample_list
=
res_sample_list
...
...
@@ -38,7 +38,7 @@ class NoiseEnergy(Energy):
grad
=
-
.
5
*
self
.
N
.
inverse_times
(
s
.
conjugate
()
*
s
)
if
self
.
_gradient
is
None
:
self
.
_value
=
lh
self
.
_gradient
=
grad
self
.
_gradient
=
grad
.
copy
()
else
:
self
.
_value
+=
lh
self
.
_gradient
+=
grad
...
...
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