MCPcopy Create free account
hub / github.com/Xilinx/CHaiDNN / readModelFile

Function readModelFile

software/xtract/caffe_network_parser.cpp:3044–3061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3042
3043
3044void 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
3063void readMeanBinaryFile(const string& caffeMeanFile, caffe::BlobProto* blob)
3064{

Callers 1

ParseCaffeNetworkFunction · 0.85

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected