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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
6859416c
Commit
6859416c
authored
Jul 24, 2018
by
Reimar H Leike
Browse files
added consistency checks for remaining energies
parent
4dc6837e
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_energies/consistency_check.py
View file @
6859416c
...
...
@@ -58,6 +58,20 @@ class Energy_Tests(unittest.TestCase):
energy
=
ift
.
GaussianEnergy
(
model
)
ift
.
extra
.
check_value_gradient_consistency
(
energy
)
@
expand
(
product
(
[
'Variable'
],
[
ift
.
GLSpace
(
15
),
ift
.
RGSpace
(
64
,
distances
=
.
789
),
ift
.
RGSpace
([
32
,
32
],
distances
=
.
789
)],
[
4
,
78
,
23
]
))
def
testQuadratic
(
self
,
type1
,
space
,
seed
):
np
.
random
.
seed
(
seed
)
S
=
ift
.
ScalingOperator
(
1.
,
space
)
s
=
[
S
.
draw_sample
()
for
_
in
range
(
3
)]
energy
=
ift
.
QuadraticEnergy
(
s
[
0
],
ift
.
makeOp
(
s
[
1
]),
s
[
2
])
ift
.
extra
.
check_value_gradient_consistency
(
energy
)
@
expand
(
product
(
[
'Variable'
],
[
ift
.
GLSpace
(
15
),
...
...
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