[opengm] 130/386: struct-max-margin: set data-weights only once for all models
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:36:05 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 e4b93b72c3e45ee187cf0c5cc9a8e4d344ba98eb
Author: Jan Funke <funke at ini.ch>
Date: Thu Dec 18 16:17:40 2014 +0100
struct-max-margin: set data-weights only once for all models
---
include/opengm/learning/struct-max-margin.hxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/opengm/learning/struct-max-margin.hxx b/include/opengm/learning/struct-max-margin.hxx
index 04634ed..d76388e 100644
--- a/include/opengm/learning/struct-max-margin.hxx
+++ b/include/opengm/learning/struct-max-margin.hxx
@@ -96,6 +96,9 @@ private:
// best-effort, and a negative contribution for the maximizer
// y*.
+ // set the weights w in E(x,y) and F(x,y)
+ _dataset.getWeights() = w;
+
for (int i = 0; i < _dataset.getNumberOfModels(); i++) {
// get E(x,y) and F(x,y)
@@ -103,9 +106,6 @@ private:
const typename DatasetType::GMType& gm = _dataset.getModel(i);
const typename DatasetType::GMWITHLOSS& gml = _dataset.getModelWithLoss(i);
- // set the weights w in E(x,y) and F(x,y)
- _dataset.getWeights() = w;
-
// get the best-effort solution y'
const ConfigurationType& bestEffort = _dataset.getGT(i);
--
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