senguptaumd / SfSNet

231 stars 45 forks source link

Model and Weights error result in Matlab crash #5

Open RichardoTiono opened 5 years ago

RichardoTiono commented 5 years ago

Hi, I have some problem when running a test in your code. Apparently I keep getting crash when I tried to run your code and I manage to track which part that gives the error which is when trying to load the model. So I tried to check if the problem persist when I tried to open other model, I tried to open other model and I was able to print out the Net. So can you help me fix this?

I have put below the part that has error on it.

clc; clear; % %% TO DO: Add your Matcaffe path as $PATH_TO_CAFFE/matlab PATH_TO_CAFFE_MATLAB='/home/cgal/caffe/matlab/'; addpath(genpath(PATH_TO_CAFFE_MATLAB));

addpath(genpath('functions'));

model = '/home/cgal/SfSNet/SfSNet_deploy.prototxt'; weights='/home/cgal/SfSNet/SfSNet.caffemodel.h5';

%model = '/home/cgal/caffe/models/bvlc_reference_caffenet/deploy.prototxt'; %weights = '/home/cgal/caffe/models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel';

GPU_ID=0; %Set your GPU ID caffe.set_mode_gpu(); caffe.set_device(GPU_ID); net = caffe.Net(model, weights, 'test');

MichaelRren commented 4 years ago

I have encounterd the same issue, have you tackled it?

RichardoTiono commented 4 years ago

Nah I give up using it on matlab and use it on python instead. You can try this one python

MichaelRren commented 4 years ago

It works. Thanks.