//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);
--