Commit 6859416c authored by Reimar H Leike's avatar Reimar H Leike

added consistency checks for remaining energies

parent 4dc6837e
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment