From 16cd104b1daf81fd98d5a7fd903bdc3574f21ca1 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 7 May 2017 16:57:34 -0400 Subject: [PATCH] Fixed affine_fc and clarified error message. --- tools/convert_dlib_nets_to_caffe/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/convert_dlib_nets_to_caffe/main.cpp b/tools/convert_dlib_nets_to_caffe/main.cpp index 7779f834c..40388e217 100644 --- a/tools/convert_dlib_nets_to_caffe/main.cpp +++ b/tools/convert_dlib_nets_to_caffe/main.cpp @@ -253,19 +253,18 @@ void convert_dlib_xml_to_cafffe_python_code( else if (i->detail_name == "bn_con" || i->detail_name == "bn_fc") { throw dlib::error("Conversion from dlib's batch norm layers to caffe's isn't supported. Instead, " - "you should put your network into 'test mode' by switching batch norm layers to affine layers."); + "you should put your dlib network into 'test mode' by switching batch norm layers to affine layers. " + "Then you can convert that 'test mode' network to caffe."); } else if (i->detail_name == "affine_con") { fout << " n." << i->caffe_layer_name() << " = L.Scale(n." << find_input_layer_caffe_name(i); - fout << ", axis=1"; fout << ", bias_term=True"; fout << ");\n"; } else if (i->detail_name == "affine_fc") { fout << " n." << i->caffe_layer_name() << " = L.Scale(n." << find_input_layer_caffe_name(i); - fout << ", axis=3"; fout << ", bias_term=True"; fout << ");\n"; }