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
5cea44a2
Commit
5cea44a2
authored
6 years ago
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a max runtime option.
parent
918bbd5d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
structural_object_detection_trainer.h
dlib/svm/structural_object_detection_trainer.h
+13
-0
structural_object_detection_trainer_abstract.h
dlib/svm/structural_object_detection_trainer_abstract.h
+19
-0
No files found.
dlib/svm/structural_object_detection_trainer.h
View file @
5cea44a2
...
@@ -133,6 +133,19 @@ namespace dlib
...
@@ -133,6 +133,19 @@ namespace dlib
scalar_type
get_epsilon
(
scalar_type
get_epsilon
(
)
const
{
return
eps
;
}
)
const
{
return
eps
;
}
void
set_max_runtime
(
const
std
::
chrono
::
nanoseconds
&
max_runtime
)
{
solver
.
set_max_runtime
(
max_runtime
);
}
std
::
chrono
::
nanoseconds
get_max_runtime
(
)
const
{
return
solver
.
get_max_runtime
();
}
void
set_max_cache_size
(
void
set_max_cache_size
(
unsigned
long
max_size
unsigned
long
max_size
)
)
...
...
This diff is collapsed.
Click to expand it.
dlib/svm/structural_object_detection_trainer_abstract.h
View file @
5cea44a2
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include "../image_processing/object_detector_abstract.h"
#include "../image_processing/object_detector_abstract.h"
#include "../image_processing/box_overlap_testing_abstract.h"
#include "../image_processing/box_overlap_testing_abstract.h"
#include "../image_processing/full_object_detection_abstract.h"
#include "../image_processing/full_object_detection_abstract.h"
#include <chrono>
namespace
dlib
namespace
dlib
...
@@ -63,6 +64,8 @@ namespace dlib
...
@@ -63,6 +64,8 @@ namespace dlib
(note that only the "configuration" of scanner is copied.
(note that only the "configuration" of scanner is copied.
I.e. the copy is done using copy_configuration())
I.e. the copy is done using copy_configuration())
- #auto_set_overlap_tester() == true
- #auto_set_overlap_tester() == true
- #get_max_runtime() == std::chrono::hours(24*356*290)
(i.e. 290 years, so basically forever)
!*/
!*/
const
image_scanner_type
&
get_scanner
(
const
image_scanner_type
&
get_scanner
(
...
@@ -144,6 +147,22 @@ namespace dlib
...
@@ -144,6 +147,22 @@ namespace dlib
of its optimal value".
of its optimal value".
!*/
!*/
void
set_max_runtime
(
const
std
::
chrono
::
nanoseconds
&
max_runtime
);
/*!
ensures
- #get_max_runtime() == max_runtime
!*/
std
::
chrono
::
nanoseconds
get_max_runtime
(
)
const
;
/*!
ensures
- returns the maximum amount of time we will let .train() run before
making it terminate.
!*/
void
set_max_cache_size
(
void
set_max_cache_size
(
unsigned
long
max_size
unsigned
long
max_size
);
);
...
...
This diff is collapsed.
Click to expand it.
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