ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Driver.cpp File Reference
#include "VerifyFlatBuffers.h"
#include <arser/arser.h>
#include <iostream>
#include <memory>
#include <string>

Go to the source code of this file.

Functions

int entry (int argc, char **argv)
 

Function Documentation

◆ entry()

int entry ( int  argc,
char **  argv 
)

Definition at line 25 of file Driver.cpp.

26{
28 arser.add_argument("circle").help("Circle file path to verify");
29
30 try
31 {
32 arser.parse(argc, argv);
33 }
34 catch (const std::runtime_error &err)
35 {
36 std::cout << err.what() << std::endl;
37 std::cout << arser;
38 return 255;
39 }
40
41 auto verifier = std::make_unique<VerifyFlatbuffers>();
42
43 std::string model_file = arser.get<std::string>("circle");
44
45 std::cout << "[ RUN ] Check " << model_file << std::endl;
46
47 auto result = verifier->run(model_file);
48
49 if (result == 0)
50 {
51 std::cout << "[ PASS ] Check " << model_file << std::endl;
52 }
53 else
54 {
55 std::cout << "[ FAIL ] Check " << model_file << std::endl;
56 }
57
58 return result;
59}
Definition arser.h:39
result
Definition infer.py:103