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

Function MakeQuantizeOperator

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

Creates a Quantize OperatorT object.

Source from the content-addressed store, hash-verified

65
66// Creates a Quantize OperatorT object.
67void MakeQuantizeOperator(ModelT* model, std::unique_ptr<OperatorT>* op,
68 int32_t input, int32_t output) {
69 OperatorT* op_raw = new OperatorT;
70 op_raw->opcode_index =
71 GetOrInsertOpCodeIndex(model, BuiltinOperator_QUANTIZE, 1);
72 op_raw->inputs = {input};
73 op_raw->outputs = {output};
74
75 op->reset(op_raw);
76}
77
78// Create a new TensorT object without quantization parameters.
79void MakeTensor(const string& name, const std::vector<int32_t>& shape,

Callers 4

SetInputTypeFunction · 0.85
SetOutputTypeFunction · 0.85
ApplyConstraintsFunction · 0.85
QuantizeOpInputFunction · 0.85

Calls 2

GetOrInsertOpCodeIndexFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected