-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
matlab warning #5346
Comments
is that ok for ignoring? |
I have the same problem, have you solved it? |
I have the same problem!!! have you solved it? |
The problem seems to be caused by the way object initialization is handled in Matlab.
replaces the output object and therefore implicitly destroys the original object causing the destructor to be called on an object with an empty hNet_self "pointer". |
hi, thank you very much, I installed MATLAB2016a and it worked correctly.
…On 5/4/17, Malte Stær Nissen ***@***.***> wrote:
The problem seems to be caused by the way object initialization is handled
in Matlab.
Upon creation of a Net object, the output object (self) is actually created
before any code is executed.
The code in Net.m, line 31:
> self = caffe.get_net(varargin{:});
replaces the output object and therefore implicitly destroys the original
object causing the destructor to be called on an object with an empty
hNet_self "pointer".
This is fixable by adding a clause in the destructor checking if
self.hNet_sel is empty or not.
I've create the PR #5588 fixing this issue
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#5346 (comment)
|
I run the matlab classification_demo on windows, and I get the following error: Warning: The following error was caught while executing 'caffe.Net' class destructor: Error using caffe_ Could not convert handle to pointer due to invalid init_key. The object might have been cleared. Error in caffe.Net/delete (line 72) caffe_('delete_net', self.hNet_self); Just like @ShaggO put it," When constructing a network, the internal object initialization of Matlab actually creates a new network and replaces the already instantiated object, causing an empty network to be deleted".But the method and change used in BVLC#5346 and PR BVLC#5588 does not work for me.Since the solver object may have already been deleted but we still reference it like this, 'self.hSolver_self '. We must check if the sovler object is still valid before deleting it.
make all ok
make test ok
make matcaffe ok
make mattest 7 passed
but when I ran "net = caffe.Net(model, weights, 'test');" in matlab,I got this
Warning: The following error was caught while executing 'caffe.Net' class destructor:
Error using caffe_
Usage: caffe_('delete_solver', hNet)
Error in caffe.Net/delete (line 72)
caffe_('delete_net', self.hNet_self);
Error in caffe.Net (line 31)
self = caffe.get_net(varargin{:});
system configuration
Operating system:Ubuntu16.10
Compiler:gcc 5.4
CUDA version (if applicable):8.0
CUDNN version (if applicable):5.1
BLAS:openblas
Python or MATLAB version (for pycaffe and matcaffe respectively):matlab2016b
The text was updated successfully, but these errors were encountered: