| 3019 | } |
| 3020 | |
| 3021 | void readDeployFile(const string& deployFile, caffe::NetParameter* Net) |
| 3022 | { |
| 3023 | int fileDescriptor = open(deployFile.c_str(), O_RDONLY); |
| 3024 | if(fileDescriptor < 0) |
| 3025 | { |
| 3026 | cerr << "[EP001] Couldn't open the deploy file : " << deployFile << endl; |
| 3027 | exit(-1); |
| 3028 | } |
| 3029 | |
| 3030 | // Merge the deploy file to caffe Net |
| 3031 | google::protobuf::io::FileInputStream* fileInput = new google::protobuf::io::FileInputStream(fileDescriptor); |
| 3032 | bool status = google::protobuf::TextFormat::Parse(fileInput, Net); |
| 3033 | if(!status) |
| 3034 | { |
| 3035 | cerr << "[EP002] Couldn't Parse the deploy file : " << deployFile << endl; |
| 3036 | exit(-1); |
| 3037 | } |
| 3038 | |
| 3039 | delete fileInput; |
| 3040 | close(fileDescriptor); |
| 3041 | } |
| 3042 | |
| 3043 | |
| 3044 | void readModelFile(const string& caffemodelFile, caffe::NetParameter* Net) |
no test coverage detected