| 35 | } // namespace |
| 36 | |
| 37 | TfLiteStatus NumElements(const TensorT& tensor, uint64_t* num_elements) { |
| 38 | *num_elements = 1; |
| 39 | for (const uint64_t dim : tensor.shape) { |
| 40 | *num_elements *= dim; |
| 41 | } |
| 42 | return kTfLiteOk; |
| 43 | } |
| 44 | |
| 45 | // Nudge min and max so that floating point 0 falls exactly on a quantized |
| 46 | // value, returning the nudges scale and zero_point. |
no outgoing calls