| 202 | |
| 203 | template <typename T> |
| 204 | void 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 | |
| 217 | bool NumPyAccessor::access_tensor(ITensor &tensor) |
| 218 | { |
nothing calls this directly
no test coverage detected