"src/vscode:/vscode.git/clone" did not exist on "c3ec7238e61a8ac5061a1895767900439edcd08f"
resnet18.cpp 541 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <cstdio>
#include <string>
#include <fstream>
#include <numeric>
#include <stdexcept>

#include <migraph/onnx.hpp>

#include <migraph/cpu/cpu_target.hpp>
#include <migraph/generate.hpp>

int main(int argc, char const* argv[])
{
    std::string file = argv[1];
    auto prog        = migraph::parse_onnx(file);
    prog.compile(migraph::cpu::cpu_target{});
    auto s = migraph::shape{migraph::shape::float_type, {1, 3, 32, 32}};
    auto input3 = migraph::generate_argument(s, 12345);
    auto result = prog.eval({{"0", input3}});
}