Undefined function 'caffe_' for input arguments of type 'char'

213 views
Skip to first unread message

HBR

unread,
Jun 11, 2016, 4:29:42 AM6/11/16
to Caffe Users
Hi all. I am trying to run the classification_demo. I have completed the steps stated at https://github.com/BVLC/caffe/tree/windows. I only have Matlab enabled to true. My code is extremely simple

im = imread('cat.jpg');
[score, class] = classification_demo(im, 0);

But when I run it I get the following error. Undefined function 'caffe_' for input arguments of type 'char'
Can anyone help me on this ?

stone

unread,
Jul 14, 2016, 9:30:08 AM7/14/16
to Caffe Users
Hi, bro, I've been in the same place.... So do you got any movement forward? Thanks.

Matt Eicholtz

unread,
Jul 14, 2016, 3:39:02 PM7/14/16
to Caffe Users
Did you add the matcaffe directory to your MATLAB path?

For me, this directory is located at: C:\caffe-windows\Build\x64\Release\matcaffe

'caffe_' should be a mex file in the private subdirectory.
Message has been deleted

Bogdan Dzyubak

unread,
Mar 15, 2017, 7:46:59 PM3/15/17
to Caffe Users
Hi,

Having the same issue. I do have the following in the Matlab path (on Windows:

C:\Projects\caffe\matlab\+caffe\private\Release\ - this does contain a mex file "caffe_.mexw64"
C:\Projects\caffe\windows\matcaffe\

But consistently get the Undefined function 'caffe_' issue. When I tried to run the mex directly, I get this: Invalid MEX-file 'C:\Projects\caffe\matlab\+caffe\private\Release\caffe_.mexw64': The specified module could not be found. Mathworks says either dll's are missing or mex was compiled on a different Matlab version.

When I try to recreate the mex using mex('C:\Projects\caffe\matlab\+caffe\private\caffe_.cpp'), it has a bunch of path issues because things like caffe.hpp are in C:\Projects\caffe\include\caffe, under include, whereas the caffe_.cpp uses "include caffe/caffe.hpp". Maybe it's some path issue that persists from build_win.cmd script.

Was someone able to solve this? Any suggestions?

I have a CPU-only Visual Studio 2014.

Many thanks,
Bogdan

kan.wa...@gmail.com

unread,
Mar 15, 2017, 9:43:24 PM3/15/17
to Caffe Users
hi,bro, i recommend you to type "caffe.version()" in matlab command windows and see the response, if is show a error such as "there is no funtion ..." or something else,
i think there is a problem when you complied your matlab wrapper, maybe the wrong path set or the version of g++ is not  applicable.
Reply all
Reply to author
Forward
0 new messages