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

Function readMeanBinaryFile

software/xtract/caffe_network_parser.cpp:3063–3080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3061}
3062
3063void readMeanBinaryFile(const string& caffeMeanFile, caffe::BlobProto* blob)
3064{
3065 fstream infile(caffeMeanFile.c_str(), ios::in | ios::binary);
3066 if(!infile)
3067 {
3068 cerr << "[EP024] Couldn't open the Caffe Mean file : " << caffeMeanFile << endl;
3069 exit(-1);
3070 }
3071
3072 // Merge the deploy file to caffe Net
3073 bool binMergeStatus = blob->ParseFromIstream(&infile);
3074 if(!binMergeStatus)
3075 {
3076 cerr << "[EP025] Couldn't Parse the Caffe Mean file : " << caffeMeanFile << endl;
3077 exit(-1);
3078 }
3079 infile.close();
3080}
3081
3082// Extract the mean data
3083void ExtractCaffeMeanData(const caffe::BlobProto* blob, XGraph* graph)

Callers 1

ParseCaffeNetworkFunction · 0.85

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected