Train Caffe (MNIST dataset) Via Matlab Interface

604 views
Skip to first unread message

kayvan nalaie

unread,
Nov 29, 2015, 1:00:34 PM11/29/15
to Caffe Users
Hi guys,
I have installed caffe on linux(ubuntu) and ran mnist training via command prompt successfully .
but can't do that by matlab. because every time i type:
solver = caffe.Solver('./examples/mnist/lenet_solver.prototxt');
I receive an error like:
Unexpected unknown exception from MEX file..

Error in caffe.get_solver (line 7)
pSolver = caffe_('get_solver', solver_file);

Error in caffe.Solver (line 21)
        self = caffe.get_solver(varargin{:});


and i have to retype that code(solver=caff....) to create an solver object (this time create solver object successfully).

And another problem is to execute solver.solve(); and matlab get stop and in command linux command prompt i gat a message like:
blocking_queue.cpp:50] Data layer prefetch queue empty

Please help me.
Thanks.

Amir Abdi

unread,
Dec 3, 2015, 8:06:57 PM12/3/15
to Caffe Users
Same problem here.
I installed on ubuntu, MATLAB 2015b, and everything runs properly in command line.

Xu Lex

unread,
Dec 8, 2015, 9:02:11 AM12/8/15
to Caffe Users
Totally the same problem and not solve yet.
Have you found out the why?
I am using matlab2014b

在 2015年11月30日星期一 UTC+8上午2:00:34,kayvan nalaie写道:

Amir Abdi

unread,
Dec 8, 2015, 2:29:02 PM12/8/15
to Caffe Users
No, I could not solve the problem. So I'm switching to Python which I am not good at and having problems.
I suggest you take a look at Expresso. That's my next plan. Seems like they made some handy tools for Caffe.

Xu Lex

unread,
Dec 9, 2015, 3:56:54 AM12/9/15
to Caffe Users

I just tried caffe-fast-rcnn, just another version of caffe, and everything works correctly.
 

在 2015年12月9日星期三 UTC+8上午3:29:02,Amir Abdi写道:

lopezalv...@gmail.com

unread,
May 27, 2017, 6:59:24 AM5/27/17
to Caffe Users
Hi everybody:

I'm getting a similar error with MATLAB R2015a on Ubuntu 16.04.

I can successfully load the solver:

solver_file = 'lenet_solver.prototxt';
solver = caffe.Solver(solver_file);


but then, when I try to make it run

solver.solve();

I get an error. On Matlab console I see

Unexpected unknown exception from MEX file..

Error in caffe.Solver/solve (line 51)
      caffe_('solver_solve', self.hSolver_self);

And in the Ubuntu terminal the last message is

I0527 12:54:52.342578  8352 blocking_queue.cpp:49] Waiting for data

However, if a run the solver from the command line,

$CAFFE_ROOT/build/tools/train --solver="lenet_solver.prototxt"

then it works properly.

Does anybody know the reason for this problem with the Matlab interface?

Thanks.
Reply all
Reply to author
Forward
0 new messages