| 3042 | |
| 3043 | |
| 3044 | void readModelFile(const string& caffemodelFile, caffe::NetParameter* Net) |
| 3045 | { |
| 3046 | fstream infile(caffemodelFile.c_str(), ios::in | ios::binary); |
| 3047 | if(!infile) |
| 3048 | { |
| 3049 | cerr << "[EP024] Couldn't open the caffemodel file : " << caffemodelFile << endl; |
| 3050 | exit(-1); |
| 3051 | } |
| 3052 | |
| 3053 | // Merge the deploy file to caffe Net |
| 3054 | bool binMergeStatus = Net->ParseFromIstream(&infile); |
| 3055 | if(!binMergeStatus) |
| 3056 | { |
| 3057 | cerr << "[EP025] Couldn't Parse the CaffeModel file : " << caffemodelFile << endl; |
| 3058 | exit(-1); |
| 3059 | } |
| 3060 | infile.close(); |
| 3061 | } |
| 3062 | |
| 3063 | void readMeanBinaryFile(const string& caffeMeanFile, caffe::BlobProto* blob) |
| 3064 | { |
no test coverage detected