From 6cd2042dd0884ed897af1bd83733f961e29d54d1 Mon Sep 17 00:00:00 2001 From: Davis King Date: Mon, 5 Sep 2016 09:54:31 -0400 Subject: [PATCH] Renamed loss_binary_mmod_ to loss_mmod_ --- dlib/dnn/loss.h | 26 +++++++++---------- dlib/dnn/loss_abstract.h | 12 ++++----- dlib/dnn/validation.h | 2 +- dlib/dnn/validation_abstract.h | 4 +-- .../full_object_detection_abstract.h | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlib/dnn/loss.h b/dlib/dnn/loss.h index 2fef118cc..418400e82 100644 --- a/dlib/dnn/loss.h +++ b/dlib/dnn/loss.h @@ -443,7 +443,7 @@ namespace dlib // ---------------------------------------------------------------------------------------- - class loss_binary_mmod_ + class loss_mmod_ { struct intermediate_detection { @@ -470,9 +470,9 @@ namespace dlib typedef std::vector label_type; - loss_binary_mmod_() {} + loss_mmod_() {} - loss_binary_mmod_(mmod_options options_) : options(options_) {} + loss_mmod_(mmod_options options_) : options(options_) {} const mmod_options& get_options ( ) const { return options; } @@ -671,32 +671,32 @@ namespace dlib } - friend void serialize(const loss_binary_mmod_& item, std::ostream& out) + friend void serialize(const loss_mmod_& item, std::ostream& out) { - serialize("loss_binary_mmod_", out); + serialize("loss_mmod_", out); serialize(item.options, out); } - friend void deserialize(loss_binary_mmod_& item, std::istream& in) + friend void deserialize(loss_mmod_& item, std::istream& in) { std::string version; deserialize(version, in); - if (version != "loss_binary_mmod_") - throw serialization_error("Unexpected version found while deserializing dlib::loss_binary_mmod_."); + if (version != "loss_mmod_") + throw serialization_error("Unexpected version found while deserializing dlib::loss_mmod_."); deserialize(item.options, in); } - friend std::ostream& operator<<(std::ostream& out, const loss_binary_mmod_& ) + friend std::ostream& operator<<(std::ostream& out, const loss_mmod_& ) { // TODO, add options fields - out << "loss_binary_mmod"; + out << "loss_mmod"; return out; } - friend void to_xml(const loss_binary_mmod_& /*item*/, std::ostream& out) + friend void to_xml(const loss_mmod_& /*item*/, std::ostream& out) { // TODO, add options fields - out << ""; + out << ""; } private: @@ -857,7 +857,7 @@ namespace dlib }; template - using loss_binary_mmod = add_loss_layer; + using loss_mmod = add_loss_layer; // ---------------------------------------------------------------------------------------- diff --git a/dlib/dnn/loss_abstract.h b/dlib/dnn/loss_abstract.h index 686f0c3a4..6193e90e0 100644 --- a/dlib/dnn/loss_abstract.h +++ b/dlib/dnn/loss_abstract.h @@ -359,7 +359,7 @@ namespace dlib { /*! WHAT THIS OBJECT REPRESENTS - This object contains all the parameters that control the behavior of loss_binary_mmod_. + This object contains all the parameters that control the behavior of loss_mmod_. !*/ public: @@ -419,7 +419,7 @@ namespace dlib // ---------------------------------------------------------------------------------------- - class loss_binary_mmod_ + class loss_mmod_ { /*! WHAT THIS OBJECT REPRESENTS @@ -438,21 +438,21 @@ namespace dlib - image_space_to_tensor_space() A reference implementation of them and their definitions can be found in the input_rgb_image_pyramid object, which is the recommended input layer to - be used with loss_binary_mmod_. + be used with loss_mmod_. !*/ public: typedef std::vector label_type; - loss_binary_mmod_( + loss_mmod_( ); /*! ensures - #get_options() == mmod_options() !*/ - loss_binary_mmod_( + loss_mmod_( mmod_options options_ ); /*! @@ -517,7 +517,7 @@ namespace dlib }; template - using loss_binary_mmod = add_loss_layer; + using loss_mmod = add_loss_layer; // ---------------------------------------------------------------------------------------- diff --git a/dlib/dnn/validation.h b/dlib/dnn/validation.h index b347e005c..c5beb7c1a 100644 --- a/dlib/dnn/validation.h +++ b/dlib/dnn/validation.h @@ -15,7 +15,7 @@ namespace dlib typename image_array_type > const matrix test_object_detection_function ( - loss_binary_mmod& detector, + loss_mmod& detector, const image_array_type& images, const std::vector>& truth_dets, const test_box_overlap& overlap_tester = test_box_overlap(), diff --git a/dlib/dnn/validation_abstract.h b/dlib/dnn/validation_abstract.h index 5ff77eb60..38c5c60ad 100644 --- a/dlib/dnn/validation_abstract.h +++ b/dlib/dnn/validation_abstract.h @@ -14,7 +14,7 @@ namespace dlib typename image_array_type > const matrix test_object_detection_function ( - loss_binary_mmod& detector, + loss_mmod& detector, const image_array_type& images, const std::vector>& truth_dets, const test_box_overlap& overlap_tester = test_box_overlap(), @@ -27,7 +27,7 @@ namespace dlib and it must contain objects which can be accepted by detector(). ensures - This function is just like the test_object_detection_function() for - object_detector's except it runs on CNNs that use loss_binary_mmod. + object_detector's except it runs on CNNs that use loss_mmod. - Tests the given detector against the supplied object detection problem and returns the precision, recall, and average precision. Note that the task is to predict, for each images[i], the set of object locations given by diff --git a/dlib/image_processing/full_object_detection_abstract.h b/dlib/image_processing/full_object_detection_abstract.h index 779d1aa08..3a93e5903 100644 --- a/dlib/image_processing/full_object_detection_abstract.h +++ b/dlib/image_processing/full_object_detection_abstract.h @@ -145,7 +145,7 @@ namespace dlib /*! WHAT THIS OBJECT REPRESENTS This is a simple struct that is used to give training data and receive detections - from the Max-Margin Object Detection loss layer loss_binary_mmod_ object. + from the Max-Margin Object Detection loss layer loss_mmod_ object. !*/ mmod_rect() = default;