ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tf2tflite Namespace Reference

Functions

void load_customop_conf (const std::string &path, moco::ModelSignature &sig)
 Loads customop.conf into ModelSignature.
 

Function Documentation

◆ load_customop_conf()

void tf2tflite::load_customop_conf ( const std::string &  path,
moco::ModelSignature sig 
)

Loads customop.conf into ModelSignature.

Definition at line 120 of file CustomopConfLoader.cpp.

121{
122 CustomOpInfoDef def;
123
124 cwrap::Fildes fildes{open(path.c_str(), O_RDONLY)};
125
126 if (fildes.get() < 0)
127 {
128 throw std::runtime_error{"Error: " + path + " not found"};
129 }
130
131 if (!load_text(fildes, def))
132 {
133 throw std::runtime_error{"Error: Failed to parse prototxt " + path};
134 }
135
136 add_customop(def, sig);
137}
POSIX File Descriptor.
Definition Fildes.h:29

Referenced by main().