aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/keras/activations_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/keras/activations_test.py')
-rw-r--r--tensorflow/python/keras/activations_test.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tensorflow/python/keras/activations_test.py b/tensorflow/python/keras/activations_test.py
index dd0bbcff39..ad238cb0a9 100644
--- a/tensorflow/python/keras/activations_test.py
+++ b/tensorflow/python/keras/activations_test.py
@@ -169,6 +169,16 @@ class KerasActivationsTest(test.TestCase):
expected = np.tanh(test_values)
self.assertAllClose(result, expected, rtol=1e-05)
+ def test_exponential(self):
+ with self.cached_session():
+ test_values = np.random.random((2, 5))
+ x = keras.backend.placeholder(ndim=2)
+ exp = keras.activations.exponential(x)
+ f = keras.backend.function([x], [exp])
+ result = f([test_values])[0]
+ expected = np.exp(test_values)
+ self.assertAllClose(result, expected, rtol=1e-05)
+
def test_linear(self):
x = np.random.random((10, 5))
self.assertAllClose(x, keras.activations.linear(x))