def test_dfactor(self): new_step = odes._optimal_step_size( last_step=constant_op.constant(1.0), error_ratio=constant_op.constant(1e6)) with self.test_session() as sess: new_step = sess.run(new_step) self.assertAllClose(new_step, 0.2)
def test_error_ratio_one(self): new_step = odes._optimal_step_size( last_step=constant_op.constant(1.0), error_ratio=constant_op.constant(1.0)) with self.cached_session() as sess: new_step = sess.run(new_step) self.assertAllClose(new_step, 0.9)
def test_dfactor(self): new_step = odes._optimal_step_size( last_step=constant_op.constant(1.0), error_ratio=constant_op.constant(1e6)) with self.test_session() as sess: new_step = sess.run(new_step) self.assertAllClose(new_step, 0.2)
def test_ifactor(self): new_step = odes._optimal_step_size(last_step=tf.constant(1.0), error_ratio=tf.constant(0.0)) with self.test_session() as sess: new_step = sess.run(new_step) self.assertAllClose(new_step, 10.0)
def test_ifactor(self): new_step = odes._optimal_step_size(last_step=tf.constant(1.0), error_ratio=tf.constant(0.0)) with self.test_session() as sess: new_step = sess.run(new_step) self.assertAllClose(new_step, 10.0)