#include <UnpackCommand.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 UnpackCommand.hpp.
◆ run()
int tfkit::UnpackCommand::run |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| const |
|
overridevirtual |
Implements cli::Command.
Definition at line 212 of file UnpackCommand.cpp.
213{
214 tensorflow::GraphDef graph_def;
215
216 CmdArguments cmdargs(argc, argv);
217
219
220 google::protobuf::io::IstreamInputStream is{ioconfig->in()};
221
222 if (!google::protobuf::TextFormat::Parse(&is, &graph_def))
223 {
224 std::cerr << "ERROR: Failed to parse prototxt" << std::endl;
225 return 255;
226 }
227
228
229 unpack(graph_def);
230
231 google::protobuf::io::OstreamOutputStream os{ioconfig->out()};
232 google::protobuf::TextFormat::Print(graph_def, &os);
233
234 return 0;
235}
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: