报错原因:
json_parser_read.hpp:257:264: error: ‘type name’ declared as function returning an array escape
因为是在公共服务器上,没有权限修改json_parser_read.hpp,可以通过修改caffe源码来解决这个错误。
在caffe_root/src/caffe/layers/下打开detection_output_layer.cpp和detection_output_layer.cu 注释掉:
write_json(ss,output);
这一行。
在caffe_root/include/caffe/layers/下打开detection_output_layer.hpp注释掉:
#include <boost/property_tree/json_parser.hpp>
重新编译即可。