some error on compiling
Opened this issue · 30 comments
Hello, faustomilletari
This is Jian Kang. I am very interested in your work 3D-caffe. So I tried to compile your 3D-Caffe, but I encountered a problem when I make runtest. it seems that something's wrong on softmax definition(dimension). Could you help me to fix it? The problem is as below. Thank you very much.
Best wishes,
Jian Kang
make -j all:
src/caffe/layers/softmax_loss_layer.cpp: In instantiation of ‘void caffe::SoftmaxWithLossLayer::Forward_cpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vectorcaffe::Blob<Dtype_>&) [with Dtype = float]’:
src/caffe/layers/softmax_loss_layer.cpp:138:1: required from here
src/caffe/layers/softmax_loss_layer.cpp:60:16: warning: unused variable ‘weight’ [-Wunused-variable]
const Dtype* weight = bottom[2]->cpu_data();
src/caffe/layers/softmax_loss_layer.cpp: In instantiation of ‘void caffe::SoftmaxWithLossLayer::Forward_cpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vectorcaffe::Blob<Dtype_>&) [with Dtype = double]’:
src/caffe/layers/softmax_loss_layer.cpp:138:1: required from here
src/caffe/layers/softmax_loss_layer.cpp:60:16: warning: unused variable ‘weight’ [-Wunused-variable]
make runtest:
22 tests from NetTest/0, where TypeParam = caffe::CPUDevice
[ RUN ] NetTest/0.TestGetLayerByName
F0912 05:07:01.832667 3518 layer.hpp:343] Check failed: ExactNumBottomBlobs() == bottom.size() (3 vs. 2) SoftmaxWithLoss Layer takes 3 bottom blob(s) as input.
*** Check failure stack trace: ***
@ 0x2aca2464ddaa (unknown)
@ 0x2aca2464dce4 (unknown)
@ 0x2aca2464d6e6 (unknown)
@ 0x2aca24650687 (unknown)
@ 0x461059 caffe::Layer<>::CheckBlobCounts()
@ 0x2aca25f71fd4 caffe::Net<>::Init()
@ 0x2aca25f73d62 caffe::Net<>::Net()
@ 0x575099 caffe::NetTest<>::InitNetFromProtoString()
@ 0x5328bc caffe::NetTest<>::InitTinyNet()
@ 0x56f4ba caffe::NetTest_TestGetLayerByName_Test<>::TestBody()
@ 0x890b23 testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x887767 testing::Test::Run()
@ 0x88780e testing::TestInfo::Run()
@ 0x887915 testing::TestCase::Run()
@ 0x88ac58 testing::internal::UnitTestImpl::RunAllTests()
@ 0x88aee7 testing::UnitTest::Run()
@ 0x4514fa main
@ 0x2aca26e0af45 (unknown)
@ 0x457b59 (unknown)
@ (nil) (unknown)
make: *** [runtest] Aborted (core dumped)
Same issue, any luck solving it?
I think it was because you are not using cudnn.
Fausto Milletarì
Sent from my iPhone
On 7 Nov 2016, at 11:39, Luis Carlos Rivera notifications@github.com wrote:
Same issue, any luck solving it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I met the same issue, anyone solved it?
could you please copy and paste here the full output and error message?
On Nov 14, 2016, at 9:09 AM, FayeYe notifications@github.com wrote:
I met the same issue, anyone solved it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub #1 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AMtsvo-yFAsCQgwZYvq4966JLiiT8Qm6ks5q-GuegaJpZM4J7KPk.
Which version of cuDNN are you using? there have been some method signature changes between v3 and v4.
I use > v4
Fausto Milletarì
Sent from my iPhone
On 14 Nov 2016, at 23:57, Tisham Dhar notifications@github.com wrote:
Which version of cuDNN are you using? there have been some method signature changes between v3 and v4.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
This is the part of the make all output
src/caffe/layers/softmax_loss_layer.cpp: In instantiation of ‘void caffe::SoftmaxWithLossLayer<Dtype>::Forward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’: src/caffe/layers/softmax_loss_layer.cpp:138:1: required from here src/caffe/layers/softmax_loss_layer.cpp:60:16: warning: unused variable ‘weight’ [-Wunused-variable] const Dtype* weight = bottom[2]->cpu_data(); ^ src/caffe/layers/softmax_loss_layer.cpp: In instantiation of ‘void caffe::SoftmaxWithLossLayer<Dtype>::Forward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’: src/caffe/layers/softmax_loss_layer.cpp:138:1: required from here src/caffe/layers/softmax_loss_layer.cpp:60:16: warning: unused variable ‘weight’ [-Wunused-variable] CXX src/caffe/solver.cpp
I can run it, verify that you had added the pythonpath of cudnn. I'm using cudnn v5
Please feel free to edit the code to get rid of the warning
Fausto Milletarì
Sent from my iPhone
On 21 Nov 2016, at 07:32, FayeYe notifications@github.com wrote:
Thanks for your reply! When I run make all ,it will output this warning. Ignoring the warning, I can run it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Met the same problem when "make runtest " by using cudnn 5.1 based on CUDA 8.0
Any comments ?
4 tests from SoftmaxWithLossLayerTest/2, where TypeParam = caffe::GPUDevice
[ RUN ] SoftmaxWithLossLayerTest/2.TestGradientIgnoreLabel
F1124 17:37:00.059399 18786 layer.hpp:343] Check failed: ExactNumBottomBlobs() == bottom.size() (3 vs. 2) SoftmaxWithLoss Layer takes 3 bottom blob(s) as input.
*** Check failure stack trace: ***
@ 0x7f7b8c32d5cd google::LogMessage::Fail()
@ 0x7f7b8c32f433 google::LogMessage::SendToLog()
@ 0x7f7b8c32d15b google::LogMessage::Flush()
@ 0x7f7b8c32fe1e google::LogMessageFatal::~LogMessageFatal()
@ 0xa75bcc caffe::GradientChecker<>::CheckGradientExhaustive()
@ 0xa7ad9f caffe::SoftmaxWithLossLayerTest_TestGradientIgnoreLabel_Test<>::TestBody()
@ 0xc45e03 testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0xc3eb9a testing::Test::Run()
@ 0xc3ece8 testing::TestInfo::Run()
@ 0xc3edf5 testing::TestCase::Run()
@ 0xc4098f testing::internal::UnitTestImpl::RunAllTests()
@ 0xc40cb3 testing::UnitTest::Run()
@ 0x7781a9 main
@ 0x7f7b83b79830 __libc_start_main
@ 0x77a2c9 _start
You mean I can ignore this error ?
Thank you !
Hi faustomilletari,
Thank you for the package! I have successfully installed 3D-caffe using "make all" with the warning you guys mentioned.
I also did "make pycaffe" and it is done too. However, when I try "import caffe" in Python, I can the following error message:
ImportError: /usr/lib/libboost_python.so.1.62.0: undefined symbol: PyUnicode_AsUTF8String
Any clue what is going on? Really appreciate!!!
Thanks Fausto! Could you let me know how did you install boost and libboost_python? what version?
Here are the steps I followed to install 3D-caffe:
- install all the dependencies
- git clone https://github.com/faustomilletari/3D-Caffe
- cp Makefile.config.example Makefile.config
- make a few changes in Makefile.config
- make all & make runtest
- make pycaffe
Let me know if I am missing anything. Thanks!
Hi
Instead of ATLAS if I use openBLAS ,will it be okay ? I know ATLAS is default but there is some issues with server.
thanks
Because there is system ATLAS ,and when I am compiling 3D vent it is giving error for ATLAS. I found solution of installlibatlas-base-dev but it downgrade the atlas version available on server.
what will be issue with cudnn 5 ,which I should use then?
I am getting error
-latlas could not be found during make all. Is there any way to avoid ,without touching existing atlas?
Okay I will try ,or I will check with openBLAS ,hope it will work.Thanks
Thanks man this build with cmake worked ...anyway I can train model without preprocessing right?
Or for pre processing which steps you normally used or do you have any script for .mhd files?
@JianKang1216 @toki2015
Hello I encountered the same issue when I run the "make runtest". This is how I solved it.
First the error looks like: Check failed: ExactNumBottomBlobs() == bottom.size() (3 vs. 2) SoftmaxWithLoss Layer takes 3 bottom blob(s) as input.
I think the error comes out cause the ExactNumBottomBlobs is set to be 3 in the loss_layer.hpp. However, for SoftmaxWithLoss layer the number of input blobs shall be 2: one is the label and the other one is the prediction blob. Therefore, simply change the ExactNumBottomBlobs to be 2 can solve this test error.
@faustomilletari Good job done for the 3D Caffe. Could you please edify this minor bug in the master version so that less people would be confused about this test error?
Thanks!
Zhuotun