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

Function NumElements

tensorflow/lite/tools/optimize/quantization_utils.cc:37–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35} // namespace
36
37TfLiteStatus 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.

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.56