MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / access_numpy_tensor

Method access_numpy_tensor

utils/GraphUtils.cpp:204–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202
203template <typename T>
204void NumPyAccessor::access_numpy_tensor(ITensor &tensor, T tolerance)
205{
206 const int num_elements = tensor.info()->tensor_shape().total_size();
207 int num_mismatches = utils::compare_tensor<T>(tensor, _npy_tensor, tolerance);
208 float percentage_mismatches = static_cast<float>(num_mismatches) / num_elements;
209
210 _output_stream << "Results: " << 100.f - (percentage_mismatches * 100) << " % matches with the provided output["
211 << _filename << "]." << std::endl;
212 _output_stream << " " << num_elements - num_mismatches << " out of " << num_elements
213 << " matches with the provided output[" << _filename << "]." << std::endl
214 << std::endl;
215}
216
217bool NumPyAccessor::access_tensor(ITensor &tensor)
218{

Callers

nothing calls this directly

Calls 2

total_sizeMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected