I've built digits from this tutorial recently, everything is ok and I finally trained my AlexNet model (also trained a SqueezNet so that I can upload the model here) ! the problem is when I download my model from Digits, I can not load it into my program for testing!I have tested my program with GoogleNet downloaded from this link and it's working fine! I'm using OpenCV readNetFromCaffe in this function to load Caffe model
void deepNetwork::loadModel( cv::String model ,cv::String weight ,string lablesPath,int ps){
patchSize=ps;
labeslPath=lablesPath;
try
{
net = dnn::readNetFromCaffe(weight,model);
cerr<<"loaded succ"<<endl;
}
catch (cv::Exception& e)
{
std::cerr << "Exception: " << e.what() << std::endl;
}}
I get the following error loading my model
OpenCV Error: Assertion failed (pbBlob.raw_data_type() == caffe::FLOAT16) in blo
bFromProto, file /home/nvidia/build-opencv/opencv/modules/dnn/src/caffe/caffe_im
porter.cpp, line 242 Exception: /home/nvidia/build-opencv/opencv/modules/dnn/src/caffe/caffe_importer .cpp:242: error: (-215) pbBlob.raw_data_type() == caffe::FLOAT16 in function blo
bFromProtoOpenCV Error: Requested object was not found (Requested blob "data" not found) i
n setInput, file /home/nvidia/build-opencv/opencv/modules/dnn/src/dnn.cpp, line
1606 terminate called after throwing an instance of 'cv::Exception'
what(): /home/nvidia/build-opencv/opencv/modules/dnn/src/dnn.cpp:1606: error: (-204) Requested blob "data" not found in function setInputAborted (core dumped)
any help would be appreciated <3
opencv version 3.3.1 also tested on (3.3.0 ,3.4.1) same error! testing on a system without Cuda, Cudnn or Caffe just pure c++ and OpenCv... but i've trained my model on a aws ec2 instance (p3.2xlarge ) with Cuda,Cudnn and caffe !
you can download the trained squeezNet model (.prototxt and .caffemodel) here