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
09f36dbf
Commit
09f36dbf
authored
Feb 22, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added python interface to cuda::set_device() and other relevant
functions.
parent
a37c5e7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
cnn_face_detector.cpp
tools/python/src/cnn_face_detector.cpp
+8
-0
No files found.
tools/python/src/cnn_face_detector.cpp
View file @
09f36dbf
...
...
@@ -155,7 +155,15 @@ void bind_cnn_face_detection(py::module& m)
detector."
);
}
m
.
def
(
"set_dnn_prefer_smallest_algorithms"
,
&
set_dnn_prefer_smallest_algorithms
,
"Tells cuDNN to use slower algorithms that use less RAM."
);
auto
cuda
=
m
.
def_submodule
(
"cuda"
,
"Routines for setting CUDA specific properties."
);
cuda
.
def
(
"set_device"
,
&
dlib
::
cuda
::
set_device
,
py
::
arg
(
"device_id"
),
"Set the active CUDA device. It is required that 0 <= device_id < get_num_devices()."
);
cuda
.
def
(
"get_device"
,
&
dlib
::
cuda
::
get_device
,
"Get the active CUDA device."
);
cuda
.
def
(
"get_num_devices"
,
&
dlib
::
cuda
::
get_num_devices
,
"Find out how many CUDA devices are available."
);
{
typedef
mmod_rect
type
;
py
::
class_
<
type
>
(
m
,
"mmod_rectangle"
,
"Wrapper around a rectangle object and a detection confidence score."
)
...
...
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