Creates a Quantize OperatorT object.
| 65 | |
| 66 | // Creates a Quantize OperatorT object. |
| 67 | void 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. |
| 79 | void MakeTensor(const string& name, const std::vector<int32_t>& shape, |
no test coverage detected