Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
09f36dbf
Commit
09f36dbf
authored
Feb 21, 2018
by
Davis King
Browse files
Added python interface to cuda::set_device() and other relevant
functions.
parent
a37c5e7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
tools/python/src/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