Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.boosting
Commits
31343e60
Commit
31343e60
authored
Feb 26, 2014
by
Manuel Günther
Browse files
Corrected test file lookup.
parent
b5cee3ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
xbob/boosting/tests/test_trainer_lut.py
View file @
31343e60
...
...
@@ -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
(
'x
bob
/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
(
'x
bob
/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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment