Skip to content

Commit

Permalink
Unit test manifold with TF
Browse files Browse the repository at this point in the history
  • Loading branch information
johmathe authored and ninamiolane committed Sep 27, 2018
1 parent 8220025 commit 7f09fa4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_manifold_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ class TestManifoldMethodsTensorFlow(tf.test.TestCase):

def setUp(self):
gs.random.seed(1234)
self.dimension = gs.random.randint(low=1, high=10)
self.dimension = 4
self.manifold = Manifold(self.dimension)

@classmethod
def setUpClass(cls):
tf.enable_eager_execution()
os.environ['GEOMSTATS_BACKEND'] = 'tensorflow'
importlib.reload(gs)

Expand All @@ -34,7 +33,7 @@ def test_dimension(self):
result = self.manifold.dimension
expected = self.dimension
with self.test_session():
self.assertAllClose(gs.eval(result), gs.eval(expected))
self.assertAllClose(result, expected)

def test_belongs(self):
point = gs.array([1, 2, 3])
Expand Down

0 comments on commit 7f09fa4

Please sign in to comment.