Commit 9a845c51 authored by Davis King's avatar Davis King

A bit of cleanup

parent 5ed1c2f2
......@@ -205,6 +205,7 @@ void bind_shape_predictors(py::module &m)
.def_readwrite("num_threads", &type::num_threads,
"Use this many threads/CPU cores for training.")
.def("__str__", &::print_shape_predictor_training_options)
.def("__repr__", &::print_shape_predictor_training_options)
.def(py::pickle(&getstate<type>, &setstate<type>));
}
{
......
......@@ -105,22 +105,22 @@ namespace dlib
}
}
string print_shape_predictor_training_options(const shape_predictor_training_options& o)
inline string print_shape_predictor_training_options(const shape_predictor_training_options& o)
{
std::ostringstream sout;
sout << "shape_predictor_training_options("
<< "be_verbose=" << o.be_verbose << ","
<< "cascade_depth=" << o.cascade_depth << ","
<< "tree_depth=" << o.tree_depth << ","
<< "num_trees_per_cascade_level=" << o.num_trees_per_cascade_level << ","
<< "nu=" << o.nu << ","
<< "oversampling_amount=" << o.oversampling_amount << ","
<< "oversampling_translation_jitter=" << o.oversampling_translation_jitter << ","
<< "feature_pool_size=" << o.feature_pool_size << ","
<< "lambda_param=" << o.lambda_param << ","
<< "num_test_splits=" << o.num_test_splits << ","
<< "feature_pool_region_padding=" << o.feature_pool_region_padding << ","
<< "random_seed=" << o.random_seed << ","
<< "be_verbose=" << o.be_verbose << ", "
<< "cascade_depth=" << o.cascade_depth << ", "
<< "tree_depth=" << o.tree_depth << ", "
<< "num_trees_per_cascade_level=" << o.num_trees_per_cascade_level << ", "
<< "nu=" << o.nu << ", "
<< "oversampling_amount=" << o.oversampling_amount << ", "
<< "oversampling_translation_jitter=" << o.oversampling_translation_jitter << ", "
<< "feature_pool_size=" << o.feature_pool_size << ", "
<< "lambda_param=" << o.lambda_param << ", "
<< "num_test_splits=" << o.num_test_splits << ", "
<< "feature_pool_region_padding=" << o.feature_pool_region_padding << ", "
<< "random_seed=" << o.random_seed << ", "
<< "num_threads=" << o.num_threads
<< ")";
return sout.str();
......
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