mirror of https://github.com/davisking/dlib.git
Added set_prior() to the python interfaces of the relevant trainer objects.
This commit is contained in:
parent
721597f219
commit
c423283c05
|
@ -212,6 +212,8 @@ void bind_svm_c_trainer()
|
||||||
.add_property("max_iterations", &T::get_max_iterations, &T::set_max_iterations)
|
.add_property("max_iterations", &T::get_max_iterations, &T::set_max_iterations)
|
||||||
.add_property("force_last_weight_to_1", &T::forces_last_weight_to_1, &T::force_last_weight_to_1)
|
.add_property("force_last_weight_to_1", &T::forces_last_weight_to_1, &T::force_last_weight_to_1)
|
||||||
.add_property("learns_nonnegative_weights", &T::learns_nonnegative_weights, &T::set_learns_nonnegative_weights)
|
.add_property("learns_nonnegative_weights", &T::learns_nonnegative_weights, &T::set_learns_nonnegative_weights)
|
||||||
|
.add_property("has_prior", &T::has_prior)
|
||||||
|
.def("set_prior", &T::set_prior)
|
||||||
.def("be_verbose", &T::be_verbose)
|
.def("be_verbose", &T::be_verbose)
|
||||||
.def("be_quiet", &T::be_quiet);
|
.def("be_quiet", &T::be_quiet);
|
||||||
|
|
||||||
|
@ -227,6 +229,8 @@ void bind_svm_c_trainer()
|
||||||
.add_property("max_iterations", &T::get_max_iterations, &T::set_max_iterations)
|
.add_property("max_iterations", &T::get_max_iterations, &T::set_max_iterations)
|
||||||
.add_property("force_last_weight_to_1", &T::forces_last_weight_to_1, &T::force_last_weight_to_1)
|
.add_property("force_last_weight_to_1", &T::forces_last_weight_to_1, &T::force_last_weight_to_1)
|
||||||
.add_property("learns_nonnegative_weights", &T::learns_nonnegative_weights, &T::set_learns_nonnegative_weights)
|
.add_property("learns_nonnegative_weights", &T::learns_nonnegative_weights, &T::set_learns_nonnegative_weights)
|
||||||
|
.add_property("has_prior", &T::has_prior)
|
||||||
|
.def("set_prior", &T::set_prior)
|
||||||
.def("be_verbose", &T::be_verbose)
|
.def("be_verbose", &T::be_verbose)
|
||||||
.def("be_quiet", &T::be_quiet);
|
.def("be_quiet", &T::be_quiet);
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,10 @@ void add_ranker (
|
||||||
.add_property("max_iterations", &trainer::get_max_iterations, &trainer::set_max_iterations)
|
.add_property("max_iterations", &trainer::get_max_iterations, &trainer::set_max_iterations)
|
||||||
.add_property("force_last_weight_to_1", &trainer::forces_last_weight_to_1, &trainer::force_last_weight_to_1)
|
.add_property("force_last_weight_to_1", &trainer::forces_last_weight_to_1, &trainer::force_last_weight_to_1)
|
||||||
.add_property("learns_nonnegative_weights", &trainer::learns_nonnegative_weights, &trainer::set_learns_nonnegative_weights)
|
.add_property("learns_nonnegative_weights", &trainer::learns_nonnegative_weights, &trainer::set_learns_nonnegative_weights)
|
||||||
|
.add_property("has_prior", &trainer::has_prior)
|
||||||
.def("train", train1<trainer>)
|
.def("train", train1<trainer>)
|
||||||
.def("train", train2<trainer>)
|
.def("train", train2<trainer>)
|
||||||
|
.def("set_prior", &trainer::set_prior)
|
||||||
.def("be_verbose", &trainer::be_verbose)
|
.def("be_verbose", &trainer::be_verbose)
|
||||||
.def("be_quiet", &trainer::be_quiet);
|
.def("be_quiet", &trainer::be_quiet);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue