ONE - On-device Neural Engine
Loading...
Searching...
No Matches
model_dump.cpp File Reference
#include "support/CommandLine.h"
#include "mir/IrDotDumper.h"
#include <caffe_importer.h>
#include <exception>
#include <iostream>

Go to the source code of this file.

Functions

int main (int argc, const char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
const char **  argv 
)

Definition at line 28 of file model_dump.cpp.

29{
30 cli::Option<std::string> model_path(cli::optname("--model"), cli::overview("Path to the model"));
32
33 try
34 {
35 auto graph = mir_caffe::loadModel(model_path);
36 dumpGraph(graph.get(), std::cout);
37 }
38 catch (std::exception &e)
39 {
40 std::cout << "Error: " << e.what() << std::endl;
41 return -1;
42 }
43
44 return 0;
45}
static CommandLine * getParser()
singleton method
void parseCommandLine(int argc, const char **argv, bool check_nonoptional=true)
parse command line option
std::unique_ptr< mir::Graph > loadModel(const std::string &filename)
void dumpGraph(const Graph *graph, std::ostream &stream)

References mir::dumpGraph(), nnc::cli::CommandLine::getParser(), mir_caffe::loadModel(), and nnc::cli::CommandLine::parseCommandLine().