| 63 | |
| 64 | template <KernelType kernel_type> |
| 65 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 66 | OpContext op_context(context, node); |
| 67 | |
| 68 | const auto* params = |
| 69 | reinterpret_cast<TfLiteFakeQuantParams*>(node->builtin_data); |
| 70 | |
| 71 | tflite::FakeQuantParams op_params; |
| 72 | op_params.num_bits = params->num_bits; |
| 73 | op_params.minmax.min = params->min; |
| 74 | op_params.minmax.max = params->max; |
| 75 | reference_ops::FakeQuant(op_params, GetTensorShape(op_context.input), |
| 76 | GetTensorData<float>(op_context.input), |
| 77 | GetTensorShape(op_context.output), |
| 78 | GetTensorData<float>(op_context.output)); |
| 79 | |
| 80 | return kTfLiteOk; |
| 81 | } |
| 82 | |
| 83 | } // namespace fake_quant |
| 84 |
nothing calls this directly
no test coverage detected