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

Function ConvertLeakyReluOperator

tensorflow/lite/toco/import_tensorflow.cc:2430–2443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2428}
2429
2430tensorflow::Status ConvertLeakyReluOperator(
2431 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
2432 const ModelFlags& model_flags, Model* model) {
2433 CHECK_EQ(node.op(), "LeakyRelu");
2434 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 1));
2435 CHECK_EQ(GetDataTypeAttr(node, "T"), DT_FLOAT);
2436 const auto& input_name = node.input(0);
2437 auto* op = new LeakyReluOperator;
2438 op->inputs.push_back(input_name);
2439 op->outputs.push_back(node.name());
2440 op->alpha = GetFloatAttr(node, "alpha");
2441 model->operators.emplace_back(op);
2442 return tensorflow::Status::OK();
2443}
2444
2445tensorflow::Status ConvertUnidirectionalSequenceRnn(
2446 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected