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

Function SetOperatorCodeVersion

tensorflow/lite/tools/optimize/model_utils.cc:122–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void SetOperatorCodeVersion(ModelT* model) {
123 for (int i = 0; i < model->operator_codes.size(); ++i) {
124 OperatorCodeT* op_code = model->operator_codes[i].get();
125 const BuiltinOperator op_buildin_code = op_code->builtin_code;
126 operator_property::OperatorProperty property =
127 operator_property::GetOperatorProperty(op_buildin_code);
128 if (property.quantizable) {
129 // Only update the versions of quantizable operations.
130 op_code->version = property.version;
131 }
132 }
133}
134
135} // namespace utils
136} // namespace optimize

Callers 1

QuantizeModelFunction · 0.85

Calls 3

GetOperatorPropertyFunction · 0.85
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected