[opengm] 56/386: fix bug in deserialization of lpotts
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:35:04 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 76ad19aa9559e7607d7cbb6408ecbcd3ca231547
Author: joergkappes <kappes at math.uni-heidelberg.de>
Date: Tue Dec 16 09:07:09 2014 +0100
fix bug in deserialization of lpotts
---
include/opengm/functions/learnable/lpotts.hxx | 1 +
src/unittest/test_learnable_functions.cxx | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/opengm/functions/learnable/lpotts.hxx b/include/opengm/functions/learnable/lpotts.hxx
index 9a42831..9ce052e 100644
--- a/include/opengm/functions/learnable/lpotts.hxx
+++ b/include/opengm/functions/learnable/lpotts.hxx
@@ -235,6 +235,7 @@ FunctionSerialization<opengm::functions::learnable::LPotts<T, I, L> >::deseriali
dst.numLabels_=*indexInIterator;
++ indexInIterator;
const size_t numW=*indexInIterator;
+ ++indexInIterator;
dst.feat_.resize(numW);
dst.weightIDs_.resize(numW);
for(size_t i=0; i<numW;++i){
diff --git a/src/unittest/test_learnable_functions.cxx b/src/unittest/test_learnable_functions.cxx
index 030ad40..49d7661 100644
--- a/src/unittest/test_learnable_functions.cxx
+++ b/src/unittest/test_learnable_functions.cxx
@@ -33,7 +33,9 @@ struct LearnableFunctionsTest {
}
void testLPotts(){
- std::cout << " * LearnablePotts ..." << std::flush;
+ std::cout << " * LearnablePotts ..." << std::endl;
+
+ std::cout << " - test basics ..." <<std::flush;
// parameter
const size_t numparam = 1;
opengm::learning::Weights<ValueType> param(numparam);
@@ -55,6 +57,8 @@ struct LearnableFunctionsTest {
}
}
}
+ std::cout << " OK" << std::endl;
+ std::cout << " - test serializations ..." <<std::flush;
{
typedef opengm::functions::learnable::LPotts<ValueType,IndexType,LabelType> FUNCTION;
const size_t sizeIndices=opengm::FunctionSerialization<FUNCTION>::indexSequenceSize(f);
@@ -81,7 +85,7 @@ struct LearnableFunctionsTest {
++walker;
}
}
- std::cout << "OK" << std::endl;
+ std::cout << " OK" << std::endl;
}
};
--
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