ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tflinspect::DumpOperators Class Referencefinal

#include <Dump.h>

Collaboration diagram for tflinspect::DumpOperators:

Public Member Functions

 DumpOperators ()=default
 
void run (std::ostream &os, const tflite::Model *model)
 
- Public Member Functions inherited from tflinspect::DumpInterface
virtual ~DumpInterface ()=default
 

Detailed Description

Definition at line 36 of file Dump.h.

Constructor & Destructor Documentation

◆ DumpOperators()

tflinspect::DumpOperators::DumpOperators ( )
default

Member Function Documentation

◆ run()

void tflinspect::DumpOperators::run ( std::ostream &  os,
const tflite::Model *  model 
)
virtual

Implements tflinspect::DumpInterface.

Definition at line 27 of file Dump.cpp.

28{
29 tflinspect::Reader reader(model);
30
31 const uint32_t subgraph_size = reader.num_subgraph();
32
33 for (uint32_t g = 0; g < subgraph_size; g++)
34 {
35 reader.select_subgraph(g);
36 auto ops = reader.operators();
37
38 // dump operators
39 for (uint32_t i = 0; i < ops->size(); ++i)
40 {
41 const auto op = ops->Get(i);
42
43 auto op_name = reader.opcode_name(op);
44
45 os << op_name << std::endl;
46 }
47 }
48}
Loads TF lite file and provides helpers to access attributes.
Definition Reader.h:43

References tflinspect::Reader::num_subgraph(), tflinspect::Reader::opcode_name(), tflinspect::Reader::operators(), and tflinspect::Reader::select_subgraph().

Referenced by package.infer.session::inference().


The documentation for this class was generated from the following files: