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

Function ConvertBatchMatMulOperator

tensorflow/lite/toco/import_tensorflow.cc:1291–1312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1289}
1290
1291tensorflow::Status ConvertBatchMatMulOperator(
1292 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
1293 const ModelFlags& model_flags, Model* model) {
1294 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 2));
1295
1296 auto* batch_matmul = new BatchMatMulOperator;
1297 // https://www.tensorflow.org/versions/r0.12/api_docs/python/math_ops/matrix_math_functions
1298 if (HasAttr(node, "adj_x")) {
1299 batch_matmul->adj_x = GetBoolAttr(node, "adj_x");
1300 }
1301 if (HasAttr(node, "adj_y")) {
1302 batch_matmul->adj_y = GetBoolAttr(node, "adj_y");
1303 }
1304 batch_matmul->inputs = {node.input(0), node.input(1)};
1305 batch_matmul->outputs = {node.name()};
1306
1307 // For Flex mode. Please read the comments of the function.
1308 RetainTensorFlowNodeDef(node, batch_matmul);
1309
1310 model->operators.emplace_back(batch_matmul);
1311 return tensorflow::Status::OK();
1312}
1313
1314tensorflow::Status ConvertMatMulOperator(
1315 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 7

CheckInputsCountFunction · 0.85
HasAttrFunction · 0.85
RetainTensorFlowNodeDefFunction · 0.85
GetBoolAttrFunction · 0.70
nameMethod · 0.65
inputMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected