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

Compilation error when trying mnist and fcn #16

Open
xjtuljy opened this issue Dec 1, 2015 · 4 comments
Open

Compilation error when trying mnist and fcn #16

xjtuljy opened this issue Dec 1, 2015 · 4 comments

Comments

@xjtuljy
Copy link

xjtuljy commented Dec 1, 2015

Hi, @terrychenism , thank you very much for providing us this windows caffe which can do fcn. I succeeded in compiling the caffe.cpp, but got errors when I tried to either compile FCN.cpp and convert_mnist_data.cpp, from the examples, could anyone suggest me the reason? I am quite new to caffe and hopefully someone could help. Thank you!

here is the error when compiling FCN.cpp in /examples/fcn/:

e:\dropbox\c++ projects\caffe-windows-cudnn-fcn\examples../examples/fcn/FCN.cpp(47): error C3861: '_mkdir': identifier not found
1>e:\dropbox\c++ projects\caffe-windows-cudnn-fcn\examples../examples/fcn/FCN.cpp(82): error C2039: 'set_phase' : is not a member of 'caffe::Caffe'
1> E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\include\caffe/common.hpp(102) : see declaration of 'caffe::Caffe'
1>e:\dropbox\c++ projects\caffe-windows-cudnn-fcn\examples../examples/fcn/FCN.cpp(82): error C2039: 'TEST' : is not a member of 'caffe::Caffe'
1> E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\include\caffe/common.hpp(102) : see declaration of 'caffe::Caffe'
1>e:\dropbox\c++ projects\caffe-windows-cudnn-fcn\examples../examples/fcn/FCN.cpp(82): error C3861: 'set_phase': identifier not found
1>e:\dropbox\c++ projects\caffe-windows-cudnn-fcn\examples../examples/fcn/FCN.cpp(92): error C2664: 'caffe::Net::Net(const caffe::NetParameter &)' : cannot convert parameter 1 from 'char *' to 'const caffe::NetParameter &'

here is the error when compiling convert_mnist_data.cpp in /examples/mnist/:

1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(86): error C3861: 'mkdir': identifier not found
1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(86): error C2512: 'google::CheckOpString' : no appropriate default constructor available
1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(95): error C3861: 'mdb_open': identifier not found
1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(95): error C2512: 'google::CheckOpString' : no appropriate default constructor available
1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(115): warning C4018: '<' : signed/unsigned mismatch
1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(120): error C3861: 'snprintf': identifier not found
1>E:\Dropbox\C++ projects\caffe-windows-cudnn-fcn\3rdparty\include../../examples/mnist/convert_mnist_data.cpp(162): error C3861: 'mdb_close': identifier not found

@terrychenism
Copy link
Owner

what kind of system do you use? windows or linux? This fcn branch only support windows.

@xjtuljy
Copy link
Author

xjtuljy commented Dec 2, 2015

Thanks for your reply @terrychenism . I downloaded the 'fcn' branch. I am using windows 7 64-bit, visual studio 2012, and CUDA 6.5. I didn't do any modifications except for resetting the 3rd party path in the project properties.

I tried to build these two which failed:
#include "../examples/fcn/FCN.cpp;
and
#include "../examples/mnist/convert_mnist_data.cpp;

but /tool/caffe.cpp can be built successfully.

And I noticed that "tools/train_net.cpp" and "tools/test_net.cpp" are not completed, while in the readme.md, train_net.cpp is suggested to be built, which is confusing somehow. Did I do anything wrong or downloaded the wrong version?

Thank you.

@terrychenism
Copy link
Owner

Please do not use "tools/train_net.cpp" and "tools/test_net.cpp", cuz "caffe.cpp" contain train and test function. Also, "fcn.cpp" should be work for this FCN branch. I didn't check "convert_mnist_data.cpp" for this branch, sorry about that.

@xjtuljy
Copy link
Author

xjtuljy commented Dec 2, 2015

Thanks Terry. I tried to debug the FCN.cpp and then it can be built:

  1. #include < direct.h >
  2. replace Caffe::set_phase(Caffe::TEST); with TEST;
  3. Net < float > caffe_test_net(argv[2],caffe::TEST);

From the code, it seems that this FCN.cpp is only used for testing, but there is neither trained fcn-8s-pascal.caffemodel.caffemodel nor fcn-8s-pascal-deploy.prototxt existing in the ../examples/fcn folder.

Did I miss anything?

Repository owner deleted a comment from Hamza-Ali0237 Feb 23, 2024
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

2 participants