Fixed incorrect input validation.

This commit is contained in:
Davis King 2018-02-11 22:40:30 -05:00
parent 0040eb7fa8
commit 52edc0d2e7
1 changed files with 2 additions and 2 deletions

View File

@ -149,8 +149,8 @@ namespace dlib
throw error("Invalid lambda_param value given to train_shape_predictor(), lambda_param must be > 0."); throw error("Invalid lambda_param value given to train_shape_predictor(), lambda_param must be > 0.");
if (!(0 < options.nu && options.nu <= 1)) if (!(0 < options.nu && options.nu <= 1))
throw error("Invalid nu value given to train_shape_predictor(). It is required that 0 < nu <= 1."); throw error("Invalid nu value given to train_shape_predictor(). It is required that 0 < nu <= 1.");
if (options.feature_pool_region_padding < 0) if (options.feature_pool_region_padding <= -0.5)
throw error("Invalid feature_pool_region_padding value given to train_shape_predictor(), feature_pool_region_padding must be >= 0."); throw error("Invalid feature_pool_region_padding value given to train_shape_predictor(), feature_pool_region_padding must be > -0.5.");
if (images.size() != detections.size()) if (images.size() != detections.size())
throw error("The list of images must have the same length as the list of detections."); throw error("The list of images must have the same length as the list of detections.");