summaryrefslogtreecommitdiff
path: root/src/python/CMakeLists.txt
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2020-10-16 14:12:05 +0200
committerGitHub <noreply@github.com>2020-10-16 14:12:05 +0200
commit3cfbb32adf1725afe3a1a9d270f520788de5c5a1 (patch)
tree688ad57654e238c40f3f9d8cd94750566108c888 /src/python/CMakeLists.txt
parent749dd136b61b50004629608ae95370dd0f61849e (diff)
parentf0beb329f5a1767e4e0a0575ef3e078bf4563a44 (diff)
Merge pull request #396 from VincentRouvreau/tensorflow_wasserstein_test
Added tests for wasserstein distance with tensorflow
Diffstat (limited to 'src/python/CMakeLists.txt')
-rw-r--r--src/python/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
index 4f26481e..c09996fe 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -103,6 +103,9 @@ if(PYTHONINTERP_FOUND)
if(EAGERPY_FOUND)
add_gudhi_debug_info("EagerPy version ${EAGERPY_VERSION}")
endif()
+ if(TENSORFLOW_FOUND)
+ add_gudhi_debug_info("TensorFlow version ${TENSORFLOW_VERSION}")
+ endif()
set(GUDHI_PYTHON_EXTRA_COMPILE_ARGS "${GUDHI_PYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_RESULT_OF_USE_DECLTYPE', ")
set(GUDHI_PYTHON_EXTRA_COMPILE_ARGS "${GUDHI_PYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_ALL_NO_LIB', ")
@@ -496,11 +499,17 @@ if(PYTHONINTERP_FOUND)
# Wasserstein
if(OT_FOUND AND PYBIND11_FOUND)
- if(TORCH_FOUND AND EAGERPY_FOUND)
+ # EagerPy dependency because of enable_autodiff=True
+ if(EAGERPY_FOUND)
add_gudhi_py_test(test_wasserstein_distance)
endif()
add_gudhi_py_test(test_wasserstein_barycenter)
endif()
+ if(OT_FOUND)
+ if(TORCH_FOUND AND TENSORFLOW_FOUND AND EAGERPY_FOUND)
+ add_gudhi_py_test(test_wasserstein_with_tensors)
+ endif()
+ endif()
# Representations
if(SKLEARN_FOUND AND MATPLOTLIB_FOUND)