[opengm] 157/386: lunary
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:37:00 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 83f6b0c3246a1c2dfc7b201ab669b4000f8aed16
Merge: bb12313 88ce0cd
Author: DerThorsten <thorsten.beier at iwr.uni-heidelberg.de>
Date: Fri Dec 19 11:54:30 2014 +0100
lunary
include/opengm/learning/gridsearch-learning.hxx | 2 +-
.../learning/loss/generalized-hammingloss.hxx | 10 ++++-----
include/opengm/learning/loss/hammingloss.hxx | 8 ++++----
include/opengm/learning/loss/noloss.hxx | 8 ++++----
src/interfaces/python/opengm/learning/__init__.py | 10 +++++----
src/interfaces/python/opengm/learning/pyLoss.cxx | 12 +++++------
.../learning/test_generalized_hammingloss.cxx | 2 +-
src/unittest/test_gm_learning_functions.cxx | 11 +++++-----
src/unittest/test_learnable_functions.cxx | 24 ----------------------
9 files changed, 33 insertions(+), 54 deletions(-)
diff --cc src/interfaces/python/opengm/learning/__init__.py
index 30cc464,da56988..5a41368
--- a/src/interfaces/python/opengm/learning/__init__.py
+++ b/src/interfaces/python/opengm/learning/__init__.py
@@@ -112,13 -112,15 +112,15 @@@ def lPottsFunctions(nFunctions, numberO
def lUnaryFunction(weights, numberOfLabels, features, weightIds):
- assert numberOfLabels >= 2
++ assert numberOfLabels >= 2
features = numpy.require(features, dtype=value_type)
weightIds = numpy.require(weightIds, dtype=index_type)
-
+
assert features.ndim == weightIds.ndim
if features.ndim == 1 or weightIds.ndim == 1:
- assert numberOfLabels ==2
+ assert numberOfLabels == 2
+ assert features.shape[0] == weightIds.shape[0]
features = features.reshape(1,-1)
weightIds = weightIds.reshape(1,-1)
--
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