Commit 31343e60 authored by Manuel Günther's avatar Manuel Günther
Browse files

Corrected test file lookup.

parent b5cee3ef
......@@ -39,7 +39,7 @@ class TestLutTrainer(unittest.TestCase):
range_feature = max_feature
trainer = xbob.boosting.trainer.LUTTrainer(range_feature,dimension_feature)
features = bob.io.load('xbob/boosting/tests/datafile.hdf5')
features = bob.io.load(bob.test.utils.datafile('datafile.hdf5', 'xbob.boosting', 'tests'))
x_train1 = numpy.copy(features)
x_train1[x_train1[:,selected_index] >=10, selected_index] = 9
......@@ -68,7 +68,7 @@ class TestLutTrainer(unittest.TestCase):
selected_index = 5
range_feature = max_feature + delta
trainer = xbob.boosting.trainer.LUTTrainer(range_feature, dimension_feature)
features = bob.io.load('xbob/boosting/tests/datafile.hdf5').astype(numpy.uint16)
features = bob.io.load(bob.test.utils.datafile('datafile.hdf5', 'xbob.boosting', 'tests')).astype(numpy.uint16)
x_train = numpy.vstack((features, features))
x_train[0:num_samples,selected_index] = x_train[0:num_samples,selected_index] + delta
......@@ -91,9 +91,8 @@ class TestLutTrainer(unittest.TestCase):
selected_index = 5
range_feature = max_feature + delta
trainer = xbob.boosting.trainer.LUTTrainer(range_feature, dimension_feature)
data_file = bob.io.File('xbob/boosting/tests/datafile.hdf5', 'r')
features = data_file.read().astype(numpy.uint16)
features = bob.io.load(bob.test.utils.datafile('datafile.hdf5', 'xbob.boosting', 'tests')).astype(numpy.uint16)
x_train = numpy.vstack((features, features))
x_train[0:num_samples,selected_index] = x_train[0:num_samples,selected_index] + delta
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment