| 1336 | } |
| 1337 | |
| 1338 | tensorflow::Status ConvertConcatOperator( |
| 1339 | const NodeDef& node, const TensorFlowImportFlags& tf_import_flags, |
| 1340 | const ModelFlags& model_flags, Model* model) { |
| 1341 | Operator* op = nullptr; |
| 1342 | if (node.op() == "Concat") { |
| 1343 | op = new TensorFlowConcatOperator; |
| 1344 | } else if (node.op() == "ConcatV2") { |
| 1345 | op = new TensorFlowConcatV2Operator; |
| 1346 | } else { |
| 1347 | LOG(FATAL) << "Expected Concat or ConcatV2"; |
| 1348 | } |
| 1349 | const int num_inputs = GetInputsCount(node, tf_import_flags); |
| 1350 | QCHECK_GE(num_inputs, 2) |
| 1351 | << node.op() |
| 1352 | << " node expects at least 2 inputs other than control dependencies: " |
| 1353 | << node.DebugString(); |
| 1354 | CHECK_EQ(num_inputs, 1 + GetIntAttr(node, "N")); |
| 1355 | for (int i = 0; i < num_inputs; ++i) { |
| 1356 | op->inputs.push_back(node.input(i)); |
| 1357 | } |
| 1358 | op->outputs.push_back(node.name()); |
| 1359 | model->operators.emplace_back(op); |
| 1360 | return tensorflow::Status::OK(); |
| 1361 | } |
| 1362 | |
| 1363 | tensorflow::Status ConvertMirrorPadOperator( |
| 1364 | const NodeDef& node, const TensorFlowImportFlags& tf_import_flags, |
nothing calls this directly
no test coverage detected