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

Function ConvertSplitVOperator

tensorflow/lite/toco/import_tensorflow.cc:1142–1159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140}
1141
1142tensorflow::Status ConvertSplitVOperator(
1143 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
1144 const ModelFlags& model_flags, Model* model) {
1145 CHECK_EQ(node.op(), "SplitV");
1146 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 3));
1147 auto* op = new TensorFlowSplitVOperator;
1148 op->inputs.push_back(node.input(0));
1149 op->inputs.push_back(node.input(1));
1150 op->inputs.push_back(node.input(2));
1151 const int num_split = GetIntAttr(node, "num_split");
1152 op->outputs.push_back(node.name());
1153 for (int i = 1; i < num_split; i++) {
1154 op->outputs.push_back(absl::StrCat(node.name(), ":", i));
1155 }
1156 op->num_split = num_split;
1157 model->operators.emplace_back(op);
1158 return tensorflow::Status::OK();
1159}
1160
1161tensorflow::Status ConvertSwitchOperator(
1162 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 8

CheckInputsCountFunction · 0.85
GetIntAttrFunction · 0.85
nameMethod · 0.65
StrCatFunction · 0.50
opMethod · 0.45
push_backMethod · 0.45
inputMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected