Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.em
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.learn.em
Commits
fca1e9b3
Commit
fca1e9b3
authored
10 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Bind GMMStats class
parent
5d24e859
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bob/learn/misc/main.cpp
+1
-0
1 addition, 0 deletions
bob/learn/misc/main.cpp
bob/learn/misc/main.h
+13
-0
13 additions, 0 deletions
bob/learn/misc/main.h
bob/learn/misc/test_gmm.py
+2
-2
2 additions, 2 deletions
bob/learn/misc/test_gmm.py
setup.py
+2
-1
2 additions, 1 deletion
setup.py
with
18 additions
and
3 deletions
bob/learn/misc/main.cpp
+
1
−
0
View file @
fca1e9b3
...
@@ -41,6 +41,7 @@ static PyObject* create_module (void) {
...
@@ -41,6 +41,7 @@ static PyObject* create_module (void) {
if
(
PyModule_AddStringConstant
(
module
,
"__version__"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddStringConstant
(
module
,
"__version__"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
if
(
!
init_BobLearnMiscGaussian
(
module
))
return
0
;
if
(
!
init_BobLearnMiscGaussian
(
module
))
return
0
;
if
(
!
init_BobLearnMiscGMMStats
(
module
))
return
0
;
static
void
*
PyBobLearnMisc_API
[
PyBobLearnMisc_API_pointers
];
static
void
*
PyBobLearnMisc_API
[
PyBobLearnMisc_API_pointers
];
...
...
This diff is collapsed.
Click to expand it.
bob/learn/misc/main.h
+
13
−
0
View file @
fca1e9b3
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include
<bob.learn.misc/api.h>
#include
<bob.learn.misc/api.h>
#include
<bob.learn.misc/Gaussian.h>
#include
<bob.learn.misc/Gaussian.h>
#include
<bob.learn.misc/GMMStats.h>
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03000000
...
@@ -69,4 +70,16 @@ bool init_BobLearnMiscGaussian(PyObject* module);
...
@@ -69,4 +70,16 @@ bool init_BobLearnMiscGaussian(PyObject* module);
int
PyBobLearnMiscGaussian_Check
(
PyObject
*
o
);
int
PyBobLearnMiscGaussian_Check
(
PyObject
*
o
);
// GMMStats
typedef
struct
{
PyObject_HEAD
boost
::
shared_ptr
<
bob
::
learn
::
misc
::
GMMStats
>
cxx
;
}
PyBobLearnMiscGMMStatsObject
;
extern
PyTypeObject
PyBobLearnMiscGMMStats_Type
;
bool
init_BobLearnMiscGMMStats
(
PyObject
*
module
);
int
PyBobLearnMiscGMMStats_Check
(
PyObject
*
o
);
#endif // BOB_LEARN_EM_MAIN_H
#endif // BOB_LEARN_EM_MAIN_H
This diff is collapsed.
Click to expand it.
bob/learn/misc/test_gmm.py
+
2
−
2
View file @
fca1e9b3
...
@@ -15,11 +15,11 @@ import tempfile
...
@@ -15,11 +15,11 @@ import tempfile
import
bob.io.base
import
bob.io.base
from
bob.io.base.test_utils
import
datafile
from
bob.io.base.test_utils
import
datafile
from
.
import
GMMStats
,
GMMMachine
from
.
import
GMMStats
#, GMMMachine
def
test_GMMStats
():
def
test_GMMStats
():
# Test a GMMStats
# Test a GMMStats
# Initializes a GMMStats
# Initializes a GMMStats
gs
=
GMMStats
(
2
,
3
)
gs
=
GMMStats
(
2
,
3
)
log_likelihood
=
-
3.
log_likelihood
=
-
3.
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
1
View file @
fca1e9b3
...
@@ -56,7 +56,7 @@ setup(
...
@@ -56,7 +56,7 @@ setup(
[
[
"
bob/learn/misc/cpp/Gaussian.cpp
"
,
"
bob/learn/misc/cpp/Gaussian.cpp
"
,
#"bob/learn/misc/cpp/GMMMachine.cpp",
#"bob/learn/misc/cpp/GMMMachine.cpp",
#
"bob/learn/misc/cpp/GMMStats.cpp",
"
bob/learn/misc/cpp/GMMStats.cpp
"
,
#"bob/learn/misc/cpp/IVectorMachine.cpp",
#"bob/learn/misc/cpp/IVectorMachine.cpp",
#"bob/learn/misc/cpp/JFAMachine.cpp",
#"bob/learn/misc/cpp/JFAMachine.cpp",
#"bob/learn/misc/cpp/KMeansMachine.cpp",
#"bob/learn/misc/cpp/KMeansMachine.cpp",
...
@@ -101,6 +101,7 @@ setup(
...
@@ -101,6 +101,7 @@ setup(
Extension
(
"
bob.learn.misc._library
"
,
Extension
(
"
bob.learn.misc._library
"
,
[
[
"
bob/learn/misc/gaussian.cpp
"
,
"
bob/learn/misc/gaussian.cpp
"
,
"
bob/learn/misc/gmm_stats.cpp
"
,
"
bob/learn/misc/main.cpp
"
,
"
bob/learn/misc/main.cpp
"
,
],
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment