[opengm] 30/386: change noise in datasets
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:35:01 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 7456dd9268e8b11ff2a76cc9d848c035cd0b9b53
Author: joergkappes <kappes at math.uni-heidelberg.de>
Date: Thu Nov 20 11:51:40 2014 +0100
change noise in datasets
---
include/opengm/learning/dataset/testdataset.hxx | 2 +-
include/opengm/learning/dataset/testdataset2.hxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/opengm/learning/dataset/testdataset.hxx b/include/opengm/learning/dataset/testdataset.hxx
index c907293..8504946 100644
--- a/include/opengm/learning/dataset/testdataset.hxx
+++ b/include/opengm/learning/dataset/testdataset.hxx
@@ -54,7 +54,7 @@ namespace opengm {
// function
const size_t shape[] = {numberOfLabels};
ExplicitFunction<ValueType> f(shape, shape + 1);
- ValueType val = (double)(gt_[y*64+x]) + (double)(std::rand()) / (double) (RAND_MAX) * 0.75 ;
+ ValueType val = (double)(gt_[y*64+x]) + (double)(std::rand()) / (double) (RAND_MAX) * 1.5 - 0.75 ;
f(0) = std::fabs(val-0);
f(1) = std::fabs(val-1);
typename GM::FunctionIdentifier fid = gms_[m].addFunction(f);
diff --git a/include/opengm/learning/dataset/testdataset2.hxx b/include/opengm/learning/dataset/testdataset2.hxx
index 4c71327..630f8b4 100644
--- a/include/opengm/learning/dataset/testdataset2.hxx
+++ b/include/opengm/learning/dataset/testdataset2.hxx
@@ -56,10 +56,10 @@ namespace opengm {
const size_t numExperts = 2;
const std::vector<size_t> shape(1,numberOfLabels);
std::vector<marray::Marray<ValueType> > feat(numExperts,marray::Marray<ValueType>(shape.begin(), shape.end()));
- ValueType val0 = (double)(gt_[y*64+x]) + (double)(std::rand()) / (double) (RAND_MAX) * 0.75 ;
+ ValueType val0 = (double)(gt_[y*64+x]) + (double)(std::rand()) / (double) (RAND_MAX) * 1.0 - 0.5 ;
feat[0](0) = std::fabs(val0-0);
feat[0](1) = std::fabs(val0-1);
- ValueType val1 = (double)(gt_[y*64+x]) + (double)(std::rand()) / (double) (RAND_MAX) * 1.5 ;
+ ValueType val1 = (double)(gt_[y*64+x]) + (double)(std::rand()) / (double) (RAND_MAX) * 2.0 - 1.0 ;
feat[1](0) = std::fabs(val1-0);
feat[1](1) = std::fabs(val1-1);
std::vector<size_t> wID(2);
--
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