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
10527efd
Commit
10527efd
authored
Jan 23, 2020
by
Reimar Leike
Browse files
merged the tests from the other approach
parents
e6732b8a
48e52d16
Pipeline
#67631
passed with stages
in 25 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_energy_gradients.py
View file @
10527efd
...
...
@@ -46,6 +46,17 @@ def test_gaussian(field):
energy
=
ift
.
GaussianEnergy
(
domain
=
field
.
domain
)
ift
.
extra
.
check_jacobian_consistency
(
energy
,
field
)
def
test_ScaledEnergy
(
field
):
energy
=
ift
.
GaussianEnergy
(
domain
=
field
.
domain
)
ift
.
extra
.
check_jacobian_consistency
(
energy
.
scale
(
0.3
),
field
)
# TODO: Fix tests
#lin = ift.Linearization.make_var(field)
#met1 = ift.GaussianEnergy(field)
#met2 = ift.GaussianEnergy.scale(0.3)(field)
#assert met1 == met2 / 0.3
#assert isinstance(met2, ift.SandwichOperator)
def
test_studentt
(
field
):
energy
=
ift
.
StudentTEnergy
(
domain
=
field
.
domain
,
theta
=
.
5
)
...
...
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