如何将caffemodel文件打印出来
展开全部
//1.先解析到message proto中
caffe::NetParameter proto;
int fd = open(filename, O_RDONLY);
FileInputStream* input = new FileInputStream(fd);
bool success = google::protobuf::TextFormat::Parse(input, proto);
//2.proto转化为string
std::string p;
google::protobuf::TextFormat::PrintToString(proto,&p);
--
caffe::NetParameter proto;
int fd = open(filename, O_RDONLY);
FileInputStream* input = new FileInputStream(fd);
bool success = google::protobuf::TextFormat::Parse(input, proto);
//2.proto转化为string
std::string p;
google::protobuf::TextFormat::PrintToString(proto,&p);
--
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询