Exemple #1
0
 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))
Exemple #2
0
 def test_exp(self):
     a = Variable(1.5)
     c = a.exp()
     self.assertAlmostEqual(c.value, exp(1.5))