Problems with CentOS compiler Caffe

Source: Internet
Author: User

Follow the online tutorials to configure the Caffe environment

Make All-j8

Finally appeared

Non-virtual thunk to caffe::baseprefetchingdatalayer< float > internalthreadentry ()

Finally a variety of search, Google, unexpectedly in http://discuss.cocos2d-x.org/t/error-non-virtual-thunk-to-cocos2d-cclayer-cctouchbegan/9061 in a

An answer was found in the answer because of a time-related problem in multiple classes of inheritance

Think, should be started with multi-threaded compile time appears, also is strange, in ubuntu14.04 TLS there is no this problem

Finally, the original compilation of all clean off, have tried to use a single-threaded compilation, but forgot clean, and finally caused the problem

Make clean

Make all

It's all right.

Add. Before the compilation to 33% encountered a wonderful problem, \caffe-master\src\caffe\layers\base_conv_layer.cpp in a class Convolutionparameter can not recognize

Namespace Caffe {

Template <typename dtype>
void Baseconvolutionlayer<dtype>::layersetup (const vector<blob<dtype>*>& Bottom,
Const vector<blob<dtype>*>& top) {
Check_eq (4, Bottom[0]->num_axes ()) << "Input must has 4 axes,"
<< "corresponding to (num, channels, height, width)";
Configure the kernel size, padding, stride, and inputs.
Convolutionparameter Conv_param = This->layer_param_.convolution_param ();
CHECK (!conv_param.has_kernel_size ()! =
! (Conv_param.has_kernel_h () && Conv_param.has_kernel_w ()))
<< "Filter size is kernel_size OR kernel_h and Kernel_w; Not both ";
CHECK (conv_param.has_kernel_size () | |
(Conv_param.has_kernel_h () && Conv_param.has_kernel_w ()))
<< "for Non-square filters both Kernel_h and Kernel_w is required.";
CHECK ((!conv_param.has_pad () && Conv_param.has_pad_h ()
&& Conv_param.has_pad_w ())
|| (!conv_param.has_pad_h () &&!conv_param.has_pad_w ()))
<< "Pad is pad OR pad_h and Pad_w was required.";
CHECK ((!conv_param.has_stride () && Conv_param.has_stride_h ()
&& Conv_param.has_stride_w ())
|| (!conv_param.has_stride_h () &&!conv_param.has_stride_w ()))
<< "Stride is Stride OR Stride_h and Stride_w are required.";
if (Conv_param.has_kernel_size ()) {
Kernel_h_ = Kernel_w_ = Conv_param.kernel_size ();
} else {
Kernel_h_ = Conv_param.kernel_h ();
Kernel_w_ = Conv_param.kernel_w ();
}
CHECK_GT (kernel_h_, 0) << "Filter dimensions cannot be zero.";
CHECK_GT (kernel_w_, 0) << "Filter dimensions cannot be zero.";
if (!conv_param.has_pad_h ()) {
Pad_h_ = Pad_w_ = Conv_param.pad ();
} else {
Pad_h_ = Conv_param.pad_h ();
Pad_w_ = Conv_param.pad_w ();
}

Finally, the build/caffe/proto/caffe.pb.h into the /include.

Problems with CentOS compiler Caffe

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.