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

Method QuantizeAndPopulate

tensorflow/lite/kernels/test_util.h:187–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185
186 template <typename T>
187 void QuantizeAndPopulate(int index, const std::vector<float>& data) {
188 TfLiteTensor* t = interpreter_->tensor(index);
189 auto q = Quantize<T>(data, t->params.scale, t->params.zero_point);
190 PopulateTensor(index, 0, q.data(), q.data() + q.size());
191 }
192
193 void SymmetricQuantizeAndPopulate(int index, const std::vector<float>& data) {
194 std::vector<int8_t> q = QuantizeTensor(index, data);

Callers

nothing calls this directly

Calls 3

tensorMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected