Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
a09a8f6a
Commit
a09a8f6a
authored
Aug 09, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more python doc strings
parent
9df06775
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
basic.cpp
tools/python/src/basic.cpp
+3
-1
matrix.cpp
tools/python/src/matrix.cpp
+2
-1
sequence_segmenter.cpp
tools/python/src/sequence_segmenter.cpp
+4
-2
No files found.
tools/python/src/basic.cpp
View file @
a09a8f6a
...
@@ -145,7 +145,9 @@ void resize(T& v, unsigned long n) { v.resize(n); }
...
@@ -145,7 +145,9 @@ void resize(T& v, unsigned long n) { v.resize(n); }
void
bind_basic_types
()
void
bind_basic_types
()
{
{
class_
<
std
::
vector
<
double
>
>
(
"array"
,
init
<>
())
class_
<
std
::
vector
<
double
>
>
(
"array"
,
"This object represents a 1D array of floating point numbers. "
"Moreover, it binds directly to the C++ type std::vector<double>."
,
init
<>
()
)
.
def
(
vector_indexing_suite
<
std
::
vector
<
double
>
>
())
.
def
(
vector_indexing_suite
<
std
::
vector
<
double
>
>
())
.
def
(
"__init__"
,
make_constructor
(
&
array_from_object
))
.
def
(
"__init__"
,
make_constructor
(
&
array_from_object
))
.
def
(
"__str__"
,
array__str__
)
.
def
(
"__str__"
,
array__str__
)
...
...
tools/python/src/matrix.cpp
View file @
a09a8f6a
...
@@ -193,7 +193,8 @@ void bind_matrix()
...
@@ -193,7 +193,8 @@ void bind_matrix()
.
def
(
"__setitem__"
,
&
mat_row__setitem__
)
.
def
(
"__setitem__"
,
&
mat_row__setitem__
)
.
def
(
"__getitem__"
,
&
mat_row__getitem__
);
.
def
(
"__getitem__"
,
&
mat_row__getitem__
);
class_
<
matrix
<
double
>
>
(
"matrix"
,
init
<>
())
class_
<
matrix
<
double
>
>
(
"matrix"
,
"This object represents a dense 2D matrix of floating point numbers."
"Moreover, it binds directly to the C++ type dlib::matrix<double>."
,
init
<>
())
.
def
(
"__init__"
,
make_constructor
(
&
make_matrix_from_size
))
.
def
(
"__init__"
,
make_constructor
(
&
make_matrix_from_size
))
.
def
(
"set_size"
,
&
matrix_set_size
,
(
arg
(
"rows"
),
arg
(
"cols"
)),
"Set the size of the matrix to the given number of rows and columns."
)
.
def
(
"set_size"
,
&
matrix_set_size
,
(
arg
(
"rows"
),
arg
(
"cols"
)),
"Set the size of the matrix to the given number of rows and columns."
)
.
def
(
"__init__"
,
make_constructor
(
&
from_object
))
.
def
(
"__init__"
,
make_constructor
(
&
from_object
))
...
...
tools/python/src/sequence_segmenter.cpp
View file @
a09a8f6a
...
@@ -796,13 +796,15 @@ train_sequence_segmenter() and cross_validate_sequence_segmenter() routines. "
...
@@ -796,13 +796,15 @@ train_sequence_segmenter() and cross_validate_sequence_segmenter() routines. "
.
def
(
"__str__"
,
&
segmenter_params__str__
)
.
def
(
"__str__"
,
&
segmenter_params__str__
)
.
def_pickle
(
serialize_pickle
<
segmenter_params
>
());
.
def_pickle
(
serialize_pickle
<
segmenter_params
>
());
class_
<
segmenter_type
>
(
"segmenter_type"
)
class_
<
segmenter_type
>
(
"segmenter_type"
,
"This object represents a sequence segmenter and is the type of object "
"returned by the dlib.train_sequence_segmenter() routine."
)
.
def
(
"__call__"
,
&
segmenter_type
::
segment_sequence_dense
)
.
def
(
"__call__"
,
&
segmenter_type
::
segment_sequence_dense
)
.
def
(
"__call__"
,
&
segmenter_type
::
segment_sequence_sparse
)
.
def
(
"__call__"
,
&
segmenter_type
::
segment_sequence_sparse
)
.
def_readonly
(
"weights"
,
&
segmenter_type
::
get_weights
)
.
def_readonly
(
"weights"
,
&
segmenter_type
::
get_weights
)
.
def_pickle
(
serialize_pickle
<
segmenter_type
>
());
.
def_pickle
(
serialize_pickle
<
segmenter_type
>
());
class_
<
segmenter_test
>
(
"segmenter_test"
)
class_
<
segmenter_test
>
(
"segmenter_test"
,
"This object is the output of the dlib.test_sequence_segmenter() and "
"dlib.cross_validate_sequence_segmenter() routines."
)
.
def_readwrite
(
"precision"
,
&
segmenter_test
::
precision
)
.
def_readwrite
(
"precision"
,
&
segmenter_test
::
precision
)
.
def_readwrite
(
"recall"
,
&
segmenter_test
::
recall
)
.
def_readwrite
(
"recall"
,
&
segmenter_test
::
recall
)
.
def_readwrite
(
"f1"
,
&
segmenter_test
::
f1
)
.
def_readwrite
(
"f1"
,
&
segmenter_test
::
f1
)
...
...
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