From 984b694962fc9b48523252cbde5035e1806d7e3e Mon Sep 17 00:00:00 2001 From: Davis King Date: Mon, 22 May 2017 19:11:00 -0400 Subject: [PATCH] Made error message slightly better. --- tools/convert_dlib_nets_to_caffe/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/convert_dlib_nets_to_caffe/main.cpp b/tools/convert_dlib_nets_to_caffe/main.cpp index a041a3d3f..7fa249175 100644 --- a/tools/convert_dlib_nets_to_caffe/main.cpp +++ b/tools/convert_dlib_nets_to_caffe/main.cpp @@ -143,9 +143,9 @@ void convert_dlib_xml_to_caffe_python_code( fout << "input_num_rows = " << layers.back().attribute("nr") << ";" << endl; fout << "input_num_cols = " << layers.back().attribute("nc") << ";" << endl; if (NR != layers.back().attribute("nr")) - throw dlib::error("The dlib model requires input tensors with NUM_ROWS=="+to_string(layers.back().attribute("nr"))+", but the dtoc command line specified NUM_ROWS=="+to_string(NR)); + throw dlib::error("The dlib model requires input tensors with NUM_ROWS=="+to_string((long)layers.back().attribute("nr"))+", but the dtoc command line specified NUM_ROWS=="+to_string(NR)); if (NC != layers.back().attribute("nc")) - throw dlib::error("The dlib model requires input tensors with NUM_COLUMNS=="+to_string(layers.back().attribute("nc"))+", but the dtoc command line specified NUM_COLUMNS=="+to_string(NC)); + throw dlib::error("The dlib model requires input tensors with NUM_COLUMNS=="+to_string((long)layers.back().attribute("nc"))+", but the dtoc command line specified NUM_COLUMNS=="+to_string(NC)); if (K != 3) throw dlib::error("The dlib model requires input tensors with NUM_CHANNELS==3, but the dtoc command line specified NUM_CHANNELS=="+to_string(K)); }