I'm trying to read weight and bias in a caffe framework with c++. Here is my code
shared_ptr<Blob<float> >& weight = current_layer->blobs()[0];//for weights
shared_ptr<Blob<float> >& bias = current_layer->blobs()[1];//for bias
But if for some model the bias is not present or defined it throughs a segmentation fault error.
So which function returns a boolean value which indicates the presens of bias and how to call the function in c++?