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
e0f98d92
Commit
e0f98d92
authored
May 31, 2011
by
Davis King
Browse files
Changed code so that an error message is always printed if we run out of memory while
cross_validate_trainer_threaded() is executing.
parent
daf47c0e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
dlib/svm/svm_threaded.h
dlib/svm/svm_threaded.h
+6
-0
No files found.
dlib/svm/svm_threaded.h
View file @
e0f98d92
...
...
@@ -17,6 +17,7 @@
#include <vector>
#include "../smart_pointers.h"
#include "../pipe.h"
#include <iostream>
namespace
dlib
{
...
...
@@ -64,6 +65,11 @@ namespace dlib
// invalid. In this case just return a cross validation score of 0.
result
=
0
;
}
catch
(
std
::
bad_alloc
&
)
{
std
::
cerr
<<
"
\n
std::bad_alloc thrown while running cross_validate_trainer_threaded(). Not enough memory.
\n
"
<<
std
::
endl
;
throw
;
}
}
};
}
...
...
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