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

Function ConvertMatMulOperator

tensorflow/lite/toco/import_tensorflow.cc:1314–1336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1312}
1313
1314tensorflow::Status ConvertMatMulOperator(
1315 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
1316 const ModelFlags& model_flags, Model* model) {
1317 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 2));
1318
1319 CHECK(!HasAttr(node, "adjoint_a") ||
1320 (GetBoolAttr(node, "adjoint_a") == false));
1321 CHECK(!HasAttr(node, "adjoint_b") ||
1322 (GetBoolAttr(node, "adjoint_b") == false));
1323
1324 auto* matmul = new TensorFlowMatMulOperator;
1325 if (HasAttr(node, "transpose_a")) {
1326 matmul->transpose_a = GetBoolAttr(node, "transpose_a");
1327 }
1328 if (HasAttr(node, "transpose_b")) {
1329 matmul->transpose_b = GetBoolAttr(node, "transpose_b");
1330 }
1331
1332 matmul->inputs = {node.input(0), node.input(1)};
1333 matmul->outputs = {node.name()};
1334 model->operators.emplace_back(matmul);
1335 return tensorflow::Status::OK();
1336}
1337
1338tensorflow::Status ConvertConcatOperator(
1339 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected