nqanh / affordance-net

AffordanceNet - Multiclass Instance Segmentation Framework - ICRA 2018
Other
121 stars 54 forks source link

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

Closed saadehmd closed 4 years ago

saadehmd commented 4 years ago

Hi, i am having following problem when i run demo_img.py from tools folder:-

Creating layer proposal F0311 17:06:25.735666 24859 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: Python (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, LRN, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Pooling, Power, ROIAlignment, ROIAlignment2, ROIPooling, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, SmoothL1Loss, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData) Check failure stack trace: Aborted (core dumped)

It actually generates the whole model successfully up until this layer. And then fails. Could it have anything to do with the fact that i kept the following

cuDNN acceleration switch (uncomment to build with cuDNN).

USE_CUDNN := 1

commented in the makefile.config before building caffe-affordance-net ?

saadehmd commented 4 years ago

I also tried rebuilding it with cmake. But cmake doesn't even get past the ' make all ' step and throws following errors

/home/ahmad3/affordance-net/caffe-affordance-net/include/caffe/util/cudnn.hpp(107): error: too few arguments in function call

/home/ahmad3/affordance-net/caffe-affordance-net/include/caffe/util/cudnn.hpp(126): error: argument of type "int" is incompatible with parameter of type "cudnnNanPropagation_t"

/home/ahmad3/affordance-net/caffe-affordance-net/include/caffe/util/cudnn.hpp(126): error: too few arguments in function call

3 errors detected in the compilation of "/tmp/tmpxft_00000714_00000000-4_bias_layer.cpp4.ii". CMake Error at cuda_compile_generated_bias_layer.cu.o.cmake:266 (message): Error generating file /home/ahmad3/affordance-net/caffe-affordance-net/build/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_bias_layer.cu.o

This was my build configuration with cmake i'm using cuda-10.0 and cudNN 7.6.5 Don't know if both of these are compatible for this project or not.

-- -- Caffe Configuration Summary -- General: -- Version : 1.0.0-rc3 -- Git : 4441bb3-dirty -- System : Linux -- C++ compiler : /usr/bin/c++ -- Release CXX flags : -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized -- Debug CXX flags : -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized -- Build type : Release -- -- BUILD_SHARED_LIBS : ON -- BUILD_python : ON -- BUILD_matlab : OFF -- BUILD_docs : ON -- CPU_ONLY : OFF -- USE_OPENCV : ON -- USE_LEVELDB : ON -- USE_LMDB : ON -- ALLOW_LMDB_NOLOCK : OFF -- -- Dependencies: -- BLAS : Yes (Atlas) -- Boost : Yes (ver. 1.58) -- glog : Yes -- gflags : Yes -- protobuf : Yes (ver. 2.6.1) -- lmdb : Yes (ver. 0.9.70) -- LevelDB : Yes (ver. 1.18) -- Snappy : Yes (ver. 1.1.3) -- OpenCV : Yes (ver. 3.4.9) -- CUDA : Yes (ver. 10.0) -- -- NVIDIA CUDA: -- Target GPU(s) : Auto -- GPU arch(s) : sm_75 -- cuDNN : Yes (ver. 7.6.5) -- -- Python: -- Interpreter : /usr/bin/python2.7 (ver. 2.7.12) -- Libraries : /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12) -- NumPy : /home/ahmad3/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.16.6) -- -- Documentaion: -- Doxygen : No -- config_file :
-- -- Install: -- Install path : /home/ahmad3/affordance-net/caffe-affordance-net/build/install

saadehmd commented 4 years ago

So, i finally realized, i hadn't uncommented the line : -

Uncomment to support layers written in Python (will link against Python libs)

WITH_PYTHON_LAYER := 1

in makefile.config

probably coz they didn't mentioned it at all on the official caffe installation instructions page and this version of caffe is of course using a custom : Python type layer.

So i am closing this.