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

caffe compiling problem:box_annotator_ohem_layer.cu(50): error: a template argument may not reference a local type #23

Closed
wenston2006 opened this issue Dec 13, 2018 · 3 comments

Comments

@wenston2006
Copy link

I met a problem during compiling caffe, I post the screenshot image as below. The problem is "box_annotator_ohem_layer.cu(50): error: a template argument may not reference a local type"; I add "-std=C++11" in makefile of caffe, however , the problem is still there. So have you met the problem during compiling caffe?

I use Ubuntu16.04, cuda9.0, cudnn7.0.3;
screenshot from 2018-12-13 14-27-54

@Yuliang-Liu
Copy link
Owner

See if this helps:

"box_annotator_ohem_layer uses C++11 features, you need to make changes to the makefile"

modified makefile:

ifeq ($(DEBUG), 1)

COMMON_FLAGS += -DDEBUG -g -O0 -std=c++11
NVCCFLAGS += -G

else

COMMON_FLAGS += -DNDEBUG -O2 -std=c++11

endif

From:https://blog.csdn.net/Bankeey/article/details/77573860

Have you maked clean before you recomplied the caffe? It seems you have built on your own caffe, and I recommend you to use the caffe of this repository to avoid some unpredictable issues because we have modified many things of the caffe.

@wenston2006
Copy link
Author

Thank you for your reply!I'll have a try.

@FakerYFX
Copy link

i meet the same question,have you solved it?
@wenston2006

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