From 6dcd3f494a45ced053d0b7bd33827cb7dd61b8a5 Mon Sep 17 00:00:00 2001 From: ctraizet <cedric.traizet@c-s.fr> Date: Fri, 1 Feb 2019 10:55:14 +0100 Subject: [PATCH] ENH: remove shark dimensionality reduction tests if the otb is built without the library --- .../test/CMakeLists.txt | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Modules/Applications/AppDimensionalityReduction/test/CMakeLists.txt b/Modules/Applications/AppDimensionalityReduction/test/CMakeLists.txt index 57c99b6220..e4037adcb0 100644 --- a/Modules/Applications/AppDimensionalityReduction/test/CMakeLists.txt +++ b/Modules/Applications/AppDimensionalityReduction/test/CMakeLists.txt @@ -39,19 +39,7 @@ otb_test_application(NAME apTvFEDimensionalityReductionPCA ${TEMP}/apTvChDimensionalityReductionPCA.tif) #------------------------------------------------------------------------------- -set(algos ae pca som) - -set(ae_params --algorithm autoencoder --algorithm.autoencoder.nbneuron 8 --algorithm.autoencoder.regularization 0.01 --algorithm.autoencoder.noise 0 --algorithm.autoencoder.rho 0 --algorithm.autoencoder.beta 0) - -set(pca_params --algorithm pca --algorithm.pca.dim 8) +set(algos som) set(som_params -algorithm som @@ -59,6 +47,22 @@ set(som_params -algorithm.som.n 3 3 -algorithm.som.ni 10) +if(OTB_USE_SHARK) + list(APPEND classifierList ae pca) + + set(ae_params + -algorithm autoencoder + -algorithm.autoencoder.nbneuron 8 + -algorithm.autoencoder.regularization 0.01 + -algorithm.autoencoder.noise 0 + -algorithm.autoencoder.rho 0 + -algorithm.autoencoder.beta 0) + + set(pca_params + -algorithm pca + -algorithm.pca.dim 8) +endif() + foreach(algo ${algos}) string(TOUPPER ${algo} ualgo) #------------------ TrainDimensionalityReduction TESTS------------------------ -- GitLab