[opengm] 71/386: use trws in test-learning

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:35:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository opengm.

commit dc1a4ddb92473cba908d40d91685c64e130e6214
Author: Jan Funke <funke at ini.ch>
Date:   Tue Dec 16 16:42:50 2014 +0100

    use trws in test-learning
---
 include/opengm/learning/struct-max-margin.hxx | 3 ++-
 src/unittest/CMakeLists.txt                   | 1 +
 src/unittest/test_learning.cxx                | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/opengm/learning/struct-max-margin.hxx b/include/opengm/learning/struct-max-margin.hxx
index e5b3baf..47031e1 100644
--- a/include/opengm/learning/struct-max-margin.hxx
+++ b/include/opengm/learning/struct-max-margin.hxx
@@ -118,7 +118,8 @@ private:
 
 					// find the minimizer y* of F(y,w)
 					ConfigurationType mostViolated;
-					InferenceType inference(gml);
+					typename InferenceType::Parameter p;
+					InferenceType inference(gml, p);
 					inference.infer();
 					inference.arg(mostViolated);
 
diff --git a/src/unittest/CMakeLists.txt b/src/unittest/CMakeLists.txt
index 535880b..b9f3e08 100644
--- a/src/unittest/CMakeLists.txt
+++ b/src/unittest/CMakeLists.txt
@@ -83,6 +83,7 @@ if(BUILD_TESTING)
   if(WITH_GUROBI)
     ADD_EXECUTABLE(test-learning test_learning.cxx ${headers})
      target_link_libraries(test-learning ${GUROBI_CXX_LIBRARY} ${GUROBI_LIBRARY})
+     target_link_libraries(test-learning external-library-trws)
     add_test(test-learning ${CMAKE_CURRENT_BINARY_DIR}/test-learning) 
   endif()
 
diff --git a/src/unittest/test_learning.cxx b/src/unittest/test_learning.cxx
index ec69b10..444280b 100644
--- a/src/unittest/test_learning.cxx
+++ b/src/unittest/test_learning.cxx
@@ -5,7 +5,7 @@
 #include <opengm/graphicalmodel/graphicalmodel.hxx>
 #include <opengm/operations/adder.hxx>
 #include <opengm/operations/minimizer.hxx>
-#include <opengm/inference/icm.hxx>
+#include <opengm/inference/external/trws.hxx>
 #include <opengm/utilities/metaprogramming.hxx>
 
 #include <opengm/functions/learnable/lpotts.hxx>
@@ -26,7 +26,7 @@ typedef opengm::GraphicalModel<ValueType,opengm::Adder, FunctionListType, opengm
 //typedef opengm::datasets::TestDataset<GM>  DS;
 //typedef opengm::datasets::TestDataset2<GM> DS2;
 typedef opengm::learning::HammingLoss     LOSS;
-typedef opengm::ICM<GM,opengm::Minimizer> INF;
+typedef opengm::external::TRWS<GM>        INF;
 typedef opengm::datasets::TestDataset1<GM,LOSS> DS1;
 typedef opengm::datasets::TestDataset2<GM,LOSS> DS2;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git



More information about the debian-science-commits mailing list