#include <DecodeCommand.h>
|
int | run (int argc, const char *const *argv) const override |
|
int | run (int argc, const char *const *argv) const override |
|
Public Member Functions inherited from cli::Command |
virtual | ~Command ()=default |
|
Definition at line 22 of file DecodeCommand.h.
◆ run() [1/2]
int DecodeCommand::run |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| const |
|
overridevirtual |
Implements cli::Command.
Definition at line 27 of file DecodeCommand.cpp.
28{
29 caffe::NetParameter param;
30
31
32 google::protobuf::io::IstreamInputStream is{&std::cin};
33 google::protobuf::io::CodedInputStream coded_is{&is};
34
35 if (!param.ParseFromCodedStream(&coded_is))
36 {
37 std::cerr << "ERROR: Failed to parse caffemodel" << std::endl;
38 return 255;
39 }
40
41
42 google::protobuf::io::OstreamOutputStream os{&std::cout};
43 google::protobuf::TextFormat::Print(param, &os);
44
45 return 0;
46}
◆ run() [2/2]
int DecodeCommand::run |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| const |
|
overridevirtual |
The documentation for this struct was generated from the following files: