Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using caffe: API command not recognized #30

Open
danielruelle opened this issue Jan 13, 2015 · 6 comments
Open

Error using caffe: API command not recognized #30

danielruelle opened this issue Jan 13, 2015 · 6 comments

Comments

@danielruelle
Copy link

Hi,

When I run spp_demo from Matlab, I get the following error. Hope anyone can help to solve it.
p/s: I already installed and tested caffe successfully.

spp_demo
Computing candidate regions...found 2034 candidates (in 1.535s).
Extracting CNN features from regions...Error using caffe
API command not recognized

Error in spp_features_convX (line 61)
caffe('set_gpu_available');

Error in spp_detect (line 40)
feat = spp_features_convX(im, spm_im_size, [], use_gpu);

Error in spp_demo (line 40)
dets = spp_detect(im, spp_model, spm_im_size, use_gpu);

Thank you very much,

@ShaoqingRen
Copy link
Owner

Hi @danielruelle

Are you using https://github.com/ShaoqingRen/caffe or official caffe ?
I added some new functions to my version, so if you are using the official version, some modification should be made.

Best,
Shaoqing

@danielruelle
Copy link
Author

Hi @ShaoqingRen

I use official caffe (release candidate version: https://github.com/BVLC/caffe/releases)

Last month, I successfully built and run spp_net using https://github.com/ShaoqingRen/caffe, but now I meet the following error, so I try to use official caffe instead (but it turns out the above error: API command not recognized)

"PYCAFFE" --> using https://github.com/ShaoqingRen/caffe
./include/caffe/syncedmem.hpp: In constructor ‘caffe::SyncedMemory::SyncedMemory(size_t)’:
./include/caffe/syncedmem.hpp:67:10: warning: ‘caffe::SyncedMemory::size_’ will be initialized after [-Wreorder]
size_t size_;
^
./include/caffe/syncedmem.hpp:65:10: warning: ‘size_t caffe::SyncedMemory::cpu_capacity_’ [-Wreorder]
size_t cpu_capacity_;
^
./include/caffe/syncedmem.hpp:43:12: warning: when initialized here [-Wreorder]
explicit SyncedMemory(const size_t size = 0)
^
python/caffe/_caffe.cpp: In member function ‘void caffe::PyNet::set_input_arrays(boost::python::api::object, boost::python::api::object)’:
python/caffe/_caffe.cpp:96:14: error: ‘MemoryDataLayer’ was not declared in this scope
shared_ptr<MemoryDataLayer > md_layer =
^
python/caffe/_caffe.cpp:96:35: error: template argument 1 is invalid
shared_ptr<MemoryDataLayer > md_layer =
^
python/caffe/_caffe.cpp:96:37: error: expected unqualified-id before ‘>’ token
shared_ptr<MemoryDataLayer > md_layer =
^
python/caffe/_caffe.cpp:98:8: error: ‘md_layer’ was not declared in this scope
if (!md_layer) {
^
python/caffe/_caffe.cpp:108:50: error: ‘md_layer’ was not declared in this scope
check_contiguous_array(data_arr, "data array", md_layer->datum_channels(),
^
make: *** [python/caffe/_caffe.so] Error 1

"MATCAFFE " --> using https://github.com/ShaoqingRen/caffe

In file included from ./include/caffe/blob.hpp:6:0,
from ./include/caffe/caffe.hpp:7,
from matlab/caffe/matcaffe.cpp:11:
./include/caffe/syncedmem.hpp: In constructor ‘caffe::SyncedMemory::SyncedMemory(size_t)’:
./include/caffe/syncedmem.hpp:67:10: warning: ‘caffe::SyncedMemory::size_’ will be initialized after [-Wreorder]
size_t size_;
^
./include/caffe/syncedmem.hpp:65:10: warning: ‘size_t caffe::SyncedMemory::cpu_capacity_’ [-Wreorder]
size_t cpu_capacity_;
^
./include/caffe/syncedmem.hpp:43:12: warning: when initialized here [-Wreorder]
explicit SyncedMemory(const size_t size = 0)
^

Hope you can give some suggestions,

Thanks

@danielruelle
Copy link
Author

Hi @ShaoqingRen

Thanks for your reply for this problem at #29, but when I compile https://github.com/ShaoqingRen/caffe ("make pycaffe, make matcaffe"), I get the above errors. (last month, it did not show these errors, but now).

Please give some suggestions about it.

Thank you very much

@danielruelle
Copy link
Author

Hi @ShaoqingRen

I just successfully made it. I did that by calling "make matcaffe" ONLY. (no "make pycaffe", "make all", "make test", and "make runtest" as in the official caffe). This means that your caffe repository may not work properly.

Notably, MemoryDataLayer file is missing so there are some errors related to this. I hope you can publish another SPP_net which is compatible with some latest caffe versions (such as release candidate version https://github.com/BVLC/caffe/releases). That would be very helpful.

Thank you,

@sunshineatnoon
Copy link

Hi@danielruelle, I am trying to run spp_net on mac, however I notice the author only provide caffe.mexw64 on OneDrive, I need to mex caffe on mac, do you know how to do this?

@ghost
Copy link

ghost commented May 13, 2015

I've been facing similar errors from building your version of caffe (missing layer, MemoryDataLayer and out of scope errors). Is it possible to get an update on this if possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants