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

Using minicaffe net as a class member #50

Open
ligongzheng opened this issue Sep 14, 2017 · 1 comment
Open

Using minicaffe net as a class member #50

ligongzheng opened this issue Sep 14, 2017 · 1 comment

Comments

@ligongzheng
Copy link

Hello,
I have a class like:
class A {
private:
caffe::Net* net_;
}

The constructor like:
A:A(){
net_ = new caffe::Net("**.prototxt");
}
A weird question was occurred:
When I use the class A like:
A = new A();
Everything is OK.

But when I use the class A like:
A a;
A crash happened ! After I run forward of net, I get a nan result.

@luoyetx
Copy link
Owner

luoyetx commented Sep 14, 2017

What does a crash happened mean? segment fault? Did you initialize the network parameters?

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