MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / WriteFlexOpOptions

Function WriteFlexOpOptions

tensorflow/lite/toco/tflite/operator.cc:2039–2056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2037};
2038
2039std::unique_ptr<flexbuffers::Builder> WriteFlexOpOptions(
2040 const string& tensorflow_node_def) {
2041 auto fbb = absl::make_unique<flexbuffers::Builder>();
2042
2043 ::tensorflow::NodeDef node_def;
2044 if (!node_def.ParseFromString(tensorflow_node_def)) {
2045 LOG(ERROR) << "Failed to parse TensorFlow NodeDef";
2046 return {};
2047 }
2048
2049 fbb->Vector([&]() {
2050 fbb->String(node_def.op());
2051 fbb->String(tensorflow_node_def);
2052 });
2053 fbb->Finish();
2054 LOG(INFO) << "Writing flex op: " << node_def.op();
2055 return std::unique_ptr<flexbuffers::Builder>(fbb.release());
2056}
2057
2058class TensorFlowUnsupported : public BaseOperator {
2059 public:

Callers 2

ExportOperatorsFunction · 0.85
WriteOptionsMethod · 0.85

Calls 6

VectorMethod · 0.80
ParseFromStringMethod · 0.45
StringMethod · 0.45
opMethod · 0.45
FinishMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected