ATLAS Offline Software
Loading...
Searching...
No Matches
AthExOnnxRuntime/src/EvaluateUtils.h
Go to the documentation of this file.
1// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3#ifndef EvaluateUtils_H
4#define EvaluateUtils_H
5
6#include <format>
7#include <vector>
8#include <string>
9
10namespace EvaluateUtils {
11 //*******************************************************************
12 // for reading MNIST images
13 std::vector<std::vector<std::vector<float>>> read_mnist_pixel_notFlat(const std::string &full_path);
14 inline auto spanToString = [](std::span<const float> s) {
15 std::string out;
16 for (float v : s) out += std::format("{:.2e} ", v);
17 if (!out.empty()) out.pop_back();
18 return out;
19 };
20}
21
22#endif // EvaluateUtils_H
std::vector< std::vector< std::vector< float > > > read_mnist_pixel_notFlat(const std::string &full_path)