Commit fb937072 authored by Davis King's avatar Davis King

Added utility function that can be overloaded by image scanners that want to

use nuclear norm regularization in their parameter estimation.
parent afcc4e72
......@@ -15,6 +15,21 @@
namespace dlib
{
// ----------------------------------------------------------------------------------------
template <
typename image_scanner_type,
typename svm_struct_prob_type
>
void configure_nuclear_norm_regularizer (
const image_scanner_type&,
svm_struct_prob_type&
)
{
// does nothing by default. Specific scanner types overload this function to do
// whatever is appropriate.
}
// ----------------------------------------------------------------------------------------
template <
......@@ -287,6 +302,7 @@ namespace dlib
svm_prob.set_match_eps(match_eps);
svm_prob.set_loss_per_missed_target(loss_per_missed_target);
svm_prob.set_loss_per_false_alarm(loss_per_false_alarm);
configure_nuclear_norm_regularizer(scanner, svm_prob);
matrix<double,0,1> w;
// Run the optimizer to find the optimal w.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment