29 caffe::NetParameter param;
32 google::protobuf::io::IstreamInputStream is{&std::cin};
34 if (!google::protobuf::TextFormat::Parse(&is, ¶m))
36 std::cerr <<
"ERROR: Failed to parse prototxt" << std::endl;
41 google::protobuf::io::OstreamOutputStream os{&std::cout};
42 google::protobuf::io::CodedOutputStream coded_os{&os};
44 if (!param.SerializeToCodedStream(&coded_os))
46 std::cerr <<
"ERROR: Failed to serialize" << std::endl;