20#include <onnx/onnx.pb.h>
22#include <google/protobuf/io/coded_stream.h>
23#include <google/protobuf/io/zero_copy_stream_impl.h>
24#include <google/protobuf/text_format.h>
28 onnx::ModelProto
model;
34 google::protobuf::io::IstreamInputStream is{ui->in()};
35 google::protobuf::io::CodedInputStream coded_is{&is};
37 if (!
model.ParseFromCodedStream(&coded_is))
39 std::cerr <<
"ERROR: Failed to parse ONNX model" << std::endl;
43 google::protobuf::io::OstreamOutputStream os{ui->out()};
44 google::protobuf::TextFormat::Print(model, &os);
std::unique_ptr< UI > make_ui(const Cmdline &cmdargs)
int run(int argc, const char *const *argv) const override