Commit 35a44a2e authored by Reimar Heinrich Leike's avatar Reimar Heinrich Leike

eliminated 2 TODOs

parent 5dbc6d90
......@@ -25,7 +25,6 @@ __all__ = ["check_value_gradient_consistency",
def _get_acceptable_model(M):
# TODO: do for model
val = M.value
if not np.isfinite(val.sum()):
raise ValueError('Initial Model value must be finite')
......
......@@ -31,9 +31,9 @@ class Model_Tests(unittest.TestCase):
[4, 78, 23]))
def testMul(self, space, seed):
np.random.seed(seed)
# TODO: use random Multifields instead
s1 = ift.full(space, np.random.randn())
s2 = ift.full(space, np.random.randn())
S = ift.ScalingOperator(1., space)
s1 = S.draw_sample()
s2 = S.draw_sample()
s1_var = ift.Variable(ift.MultiField({'s1': s1}))['s1']
s2_var = ift.Variable(ift.MultiField({'s2': s2}))['s2']
ift.extra.check_value_gradient_consistency(s1_var*s2_var)
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