#include <PackCommand.hpp>
|
int | run (int argc, const char *const *argv) const override |
|
Public Member Functions inherited from cli::Command |
virtual | ~Command ()=default |
|
Definition at line 25 of file PackCommand.hpp.
◆ run()
int tfkit::PackCommand::run |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| const |
|
overridevirtual |
Implements cli::Command.
Definition at line 145 of file PackCommand.cpp.
146{
147 tensorflow::GraphDef graph_def;
148
149 CmdArguments cmdargs(argc, argv);
150
152
153 google::protobuf::io::IstreamInputStream is{ioconfig->in()};
154
155 if (!google::protobuf::TextFormat::Parse(&is, &graph_def))
156 {
157 std::cerr << "ERROR: Failed to parse prototxt" << std::endl;
158 return 255;
159 }
160
161
162 pack(graph_def);
163
164 google::protobuf::io::OstreamOutputStream os{ioconfig->out()};
165 google::protobuf::TextFormat::Print(graph_def, &os);
166
167 return 0;
168}
std::unique_ptr< IOConfiguration > make_ioconfig(const CmdArguments &cmdargs)
References tfkit::make_ioconfig().
Referenced by package.infer.session::inference().
The documentation for this struct was generated from the following files: