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

Function ConvertRandomUniform

tensorflow/lite/toco/import_tensorflow.cc:1011–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1009}
1010
1011tensorflow::Status ConvertRandomUniform(
1012 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,
1013 const ModelFlags& model_flags, Model* model) {
1014 CHECK_EQ(node.op(), "RandomUniform");
1015 TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 1));
1016
1017 CHECK_EQ(GetDataTypeAttr(node, "T"), DT_INT32);
1018 auto op = absl::make_unique<RandomUniformOperator>();
1019 op->inputs.push_back(node.input(0));
1020 op->outputs.push_back(node.name());
1021 op->dtype = ConvertDataType(GetDataTypeAttr(node, "dtype"));
1022 op->seed = GetIntAttr(node, "seed");
1023 op->seed2 = GetIntAttr(node, "seed2");
1024 CHECK(model != nullptr);
1025 model->operators.emplace_back(std::move(op));
1026 return tensorflow::Status::OK();
1027}
1028
1029tensorflow::Status ConvertIdentityOperator(
1030 const NodeDef& node, const TensorFlowImportFlags& tf_import_flags,

Callers

nothing calls this directly

Calls 9

CheckInputsCountFunction · 0.85
GetDataTypeAttrFunction · 0.85
GetIntAttrFunction · 0.85
ConvertDataTypeFunction · 0.70
nameMethod · 0.65
opMethod · 0.45
push_backMethod · 0.45
inputMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected