本文主要是介绍caffe - windows vs2013 调试错误,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在Windows7下调用vs2013生成的Caffe静态库时经常会提示Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type的错误,如下图:
main所在的工程下include 下述头文件。少哪个添加哪个?
#include "caffe/layers/dropout_layer.hpp"
#include "caffe/layers/conv_layer.hpp"
#include "caffe/layers/relu_layer.hpp"#include "caffe/layers/pooling_layer.hpp"
#include "caffe/layers/lrn_layer.hpp"
#include "caffe/layers/softmax_layer.hpp"namespace caffe
{extern INSTANTIATE_CLASS(InputLayer);extern INSTANTIATE_CLASS(InnerProductLayer);extern INSTANTIATE_CLASS(DropoutLayer);extern INSTANTIATE_CLASS(ConvolutionLayer);REGISTER_LAYER_CLASS(Convolution);extern INSTANTIATE_CLASS(ReLULayer);REGISTER_LAYER_CLASS(ReLU);extern INSTANTIATE_CLASS(PoolingLayer);REGISTER_LAYER_CLASS(Pooling);extern INSTANTIATE_CLASS(LRNLayer);REGISTER_LAYER_CLASS(LRN);extern INSTANTIATE_CLASS(SoftmaxLayer);REGISTER_LAYER_CLASS(Softmax);}
这篇关于caffe - windows vs2013 调试错误的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!