def test_exp(self): a = Variable(1.5) c = a.exp() c.backward() self.assertAlmostEqual(c.value, exp(1.5)) self.assertAlmostEqual(a.d.value, exp(1.5))
def test_exp(self): a = Variable(1.5) c = a.exp() self.assertAlmostEqual(c.value, exp(1.5))