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

Function ConvertSoftmaxOperator

tensorflow/lite/toco/import_tensorflow.cc:1176–1190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1174}
1175
1176tensorflow::Status ConvertSoftmaxOperator(
1177 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
1178 const ModelFlags& model_flags, Model* model) {
1179 CHECK_EQ(node.op(), "Softmax");
1180 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 1));
1181 const auto& input_name = node.input(0);
1182 auto* softmax = new SoftmaxOperator;
1183 softmax->inputs.push_back(input_name);
1184 softmax->outputs.push_back(node.name());
1185 // TensorFlow's Softmax doesn't seem to admit a 'beta' parameter.
1186 CHECK(!node.attr().count("beta")); // Stab in the dark, just in case.
1187 softmax->beta = 1.f;
1188 model->operators.emplace_back(softmax);
1189 return tensorflow::Status::OK();
1190}
1191
1192tensorflow::Status ConvertLRNOperator(
1193 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 8

CheckInputsCountFunction · 0.85
attrMethod · 0.80
nameMethod · 0.65
opMethod · 0.45
inputMethod · 0.45
push_backMethod · 0.45
countMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected