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

#include <Dump.h>

Collaboration diagram for circleinspect::DumpOperators:

Public Member Functions

 DumpOperators ()=default
 
void run (std::ostream &os, const circle::Model *model, const std::vector< char > *data)
 
- Public Member Functions inherited from circleinspect::DumpInterface
virtual ~DumpInterface ()=default
 

Detailed Description

Definition at line 36 of file Dump.h.

Constructor & Destructor Documentation

◆ DumpOperators()

circleinspect::DumpOperators::DumpOperators ( )
default

Member Function Documentation

◆ run()

void circleinspect::DumpOperators::run ( std::ostream &  os,
const circle::Model *  model,
const std::vector< char > *  data 
)
virtual

Implements circleinspect::DumpInterface.

Definition at line 27 of file Dump.cpp.

28{
29 mio::circle::Reader reader(model, data);
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 Circle file and provides helpers to access attributes.
Definition Reader.h:39

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

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


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