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

Function RetainTensorFlowNodeDef

tensorflow/lite/toco/import_tensorflow.cc:561–563  ·  view source on GitHub ↗

Retain TensorFlow NodeDef in Toco Operator. If an op is supported by Toco but not supported by TFLite, TFLite exporter will use the retained NodeDef to populate a Flex op when Flex mode is enabled. This can't be easily applied to all operations, because a TensorFlow node may become multiple Toco operators. Thus we need to call this function in operator conversion functions one by one whenever fe

Source from the content-addressed store, hash-verified

559// TODO(b/117327937): Implement all Toco-supported ops in TFLite, and remove
560// this function.
561void RetainTensorFlowNodeDef(const NodeDef& node, Operator* op) {
562 node.SerializeToString(&op->tensorflow_node_def);
563}
564
565void GetOutputNamesFromNodeDef(const NodeDef& node,
566 const tensorflow::OpDef& op_def,

Callers 3

Calls 1

SerializeToStringMethod · 0.45

Tested by

no test coverage detected