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)
 Dump IR for given arguments.
 

Function Documentation

◆ entry()

int entry ( int  argc,
char **  argv 
)

Dump IR for given arguments.

Call example: $ ./build/compiler/encodump/encodump \ –frontend build/compiler/enco/frontend/caffe/libenco_caffe_frontend.so \ –frontend-arg build/compiler/enco/test/caffe/Convolution_003.prototxt \ –frontend-arg build/compiler/enco/test/caffe/Convolution_003.caffemodel

HDF5 layout is like below

GROUP "/" ㄴGROUP "name" ㄴATTRIBUTE "0" ㄴDATA (0): "input_01:0" ㄴATTRIBUTE "1" ㄴDATA (0): "input_02:0" ㄴGROUP "value" ㄴDATASET "0" ㄴDATA ... ㄴDATASET "1" ㄴDATA ...

Definition at line 25 of file Driver.cpp.

26{
28 arser.add_argument("tflite").help("TFLite 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>("tflite");
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