happynear / caffe-windows

Configure Caffe in one hour for Windows users.
Other
1.32k stars 650 forks source link

cpu_only compile error #279

Closed jstzwjr closed 6 years ago

jstzwjr commented 6 years ago

我主要修改了CommonSettings.props文件中的

true
<UseCuDNN>false</UseCuDNN>
<UseNCCL>false</UseNCCL>

提示无法打开cufft.lib,我就把CommonSettings.props中中间的cufft.lib删了 可是这时候报错: global_lse_margin_layer.obj : error LNK2001: 无法解析的外部符号 "protected: virtual float cdecl caffe::GlobalLSEMarginLayer::MeanShift(class caffe::Blob ,float,int)" (?MeanShift@?$GlobalLSEMarginLayer@M@caffe@@MEAAMPEAV?$Blob@M@2@MH@Z) 2>global_lse_margin_layer.obj : error LNK2001: 无法解析的外部符号 "protected: virtual float __cdecl caffe::GlobalLSEMarginLayer::MeanMaxNegativeLogit(class std::vector<class caffe::Blob ,class std::allocator<class caffe::Blob *> > const &)" (?MeanMaxNegativeLogit@?$GlobalLSEMarginLayer@M@caffe@@MEAAMAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@@Z) 2>global_lse_margin_layer.obj : error LNK2001: 无法解析的外部符号 "protected: virtual float cdecl caffe::GlobalLSEMarginLayer::CalcLSE(class std::vector<class caffe::Blob ,class std::allocator<class caffe::Blob > > const &,class caffe::Blob )" (?CalcLSE@?$GlobalLSEMarginLayer@M@caffe@@MEAAMAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@PEAV?$Blob@M@2@@Z) 2>global_lse_margin_layer.obj : error LNK2001: 无法解析的外部符号 "protected: virtual double __cdecl caffe::GlobalLSEMarginLayer::MeanShift(class caffe::Blob ,double,int)" (?MeanShift@?$GlobalLSEMarginLayer@N@caffe@@MEAANPEAV?$Blob@N@2@NH@Z) 2>global_lse_margin_layer.obj : error LNK2001: 无法解析的外部符号 "protected: virtual double __cdecl caffe::GlobalLSEMarginLayer::MeanMaxNegativeLogit(class std::vector<class caffe::Blob ,class std::allocator<class caffe::Blob > > const &)" (?MeanMaxNegativeLogit@?$GlobalLSEMarginLayer@N@caffe@@MEAANAEBV?$vector@PEAV?$Blob@N@caffe@@V?$allocator@PEAV?$Blob@N@caffe@@@std@@@std@@@Z) 2>global_lse_margin_layer.obj : error LNK2001: 无法解析的外部符号 "protected: virtual double __cdecl caffe::GlobalLSEMarginLayer::CalcLSE(class std::vector<class caffe::Blob ,class std::allocator<class caffe::Blob > > const &,class caffe::Blob *)" (?CalcLSE@?$GlobalLSEMarginLayer@N@caffe@@MEAANAEBV?$vector@PEAV?$Blob@N@caffe@@V?$allocator@PEAV?$Blob@N@caffe@@@std@@@std@@PEAV?$Blob@N@2@@Z)

请问谁遇到了类似的问题,该怎么解决啊,谢谢

happynear commented 6 years ago

把这个层删了再编译吧

jstzwjr commented 6 years ago

@happynear 谢谢大神,删了确实可以编译通过。但是您在Face-ResNet这个网络中有用到GlobalLSEMargin这个层,会有影响吗?

happynear commented 6 years ago

修复了:https://github.com/happynear/caffe-windows/commit/c3b1c7d7495a6f78c72e4b859639acd552be525e