moco-tf
moco-tf translates a TensorFlow model into loco
Purpose
moco-tf is to convert TensorFlow generated model file to in-memory loco IR Graph.
How to use
#include <moco/tf/Frontend.h>
...
::moco::tf::Frontend moco;
std::string pb_path = "path_to_pb_file_to_load";
auto loco_graph = moco.load(sig, pb_path, ::moco::tf::Frontend::FileType::Binary);
Dependency
Please refer requires.cmake for dependant modules.
Naming rules
TensorFlow node names
Use REGISTER_OP
argument used in TensorFlow source core
folder.
cd tensorflow/core
grep -Rn "REGISTER_OP"
To see single Op, Conv2D
for example
cd tensorflow/core
grep -Rn "REGISTER_OP" | grep "Conv2D"
TensorFlow Dialect IR
Use TF
prefix with TensorFlow Dialect node names
TFAvgPool
TFConv2D