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

Function ConvertSwitchOperator

tensorflow/lite/toco/import_tensorflow.cc:1161–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1159}
1160
1161tensorflow::Status ConvertSwitchOperator(
1162 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
1163 const ModelFlags& model_flags, Model* model) {
1164 CHECK_EQ(node.op(), "Switch");
1165 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 2));
1166 auto* op = new TensorFlowSwitchOperator;
1167 op->inputs.push_back(node.input(0));
1168 op->inputs.push_back(node.input(1));
1169 op->outputs.push_back(node.name());
1170 // Switch operators have two outputs: "name" and "name:1".
1171 op->outputs.push_back(node.name() + ":1");
1172 model->operators.emplace_back(op);
1173 return tensorflow::Status::OK();
1174}
1175
1176tensorflow::Status ConvertSoftmaxOperator(
1177 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 6

CheckInputsCountFunction · 0.85
nameMethod · 0.65
opMethod · 0.45
push_backMethod · 0.45
inputMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected