unsky / Deformable-ConvNets-caffe

Deformable Convolutional Networks on caffe
160 stars 83 forks source link

Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: DeformableConvolution #16

Closed lawpdas closed 6 years ago

lawpdas commented 6 years ago

I added cpp cu hpp and proto definition to my caffe, compile is ok. But when I ran the MNIST example, I got this error.

F0113 09:54:20.415395  2813 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: DeformableConvolution (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, FocalLoss, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, Python, RNN, ROIPooling, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, SmoothL1Loss, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, TripletLoss, WindowData)
*** Check failure stack trace: ***
    @     0x7fcc531445cd  google::LogMessage::Fail()
    @     0x7fcc53146433  google::LogMessage::SendToLog()
    @     0x7fcc5314415b  google::LogMessage::Flush()
    @     0x7fcc53146e1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7fcc53947e6c  caffe::Net<>::Init()
    @     0x7fcc539495ae  caffe::Net<>::Net()
    @     0x7fcc538d6775  caffe::Solver<>::InitTrainNet()
    @     0x7fcc538d7b65  caffe::Solver<>::Init()
    @     0x7fcc538d7e7f  caffe::Solver<>::Solver()
    @     0x7fcc538f03f1  caffe::Creator_SGDSolver<>()
    @           0x40ada8  train()
    @           0x4075a8  main
    @     0x7fcc51ad7830  __libc_start_main
    @           0x407e79  _start
    @              (nil)  (unknown)
Aborted (core dumped)
lawpdas commented 6 years ago

Ok, I have solved this problem. In the deformable_conv_layer.cpp: change

#ifdef CPU_ONLY
STUB_GPU(DeformableConvolutionLayer);
#endif
INSTANTIATE_CLASS(DeformableConvolutionLayer);
}  // namespace caffe

to

#ifdef CPU_ONLY
STUB_GPU(DeformableConvolutionLayer);
#endif
INSTANTIATE_CLASS(DeformableConvolutionLayer);
REGISTER_LAYER_CLASS(DeformableConvolution); // add register
}  // namespace caffe
unsky commented 6 years ago

this will work in old caffe version.

lawpdas commented 6 years ago

Sorry, I don't remember the version of caffe. But I didn't use cmake .., just make all test runtest.

hp-93 commented 6 years ago

thanks,I solved the same problem; the version of caffe is caffe-window