MCPcopy Create free account
hub / github.com/ai-techsystems/deepC / main

Function main

src/operators/ArgMin.cpp:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#ifdef DNNC_ARGMIN_TEST
30#include <iostream>
31int main() {
32 float f1[6] = {1., 2., 3., 4., 5., 6};
33 float f2[9] = {6., 1., 0., 5., 7., 4., 2., 3., 8};
34
35 tensor<float> tf1({2, 3});
36 tf1.load(f1);
37 tensor<float> tf2({3, 3});
38 tf2.load(f2);
39
40 ArgMin<int, float> ArgMinF1("floatArgMin");
41 std::cout << ArgMinF1.compute(tf1) << std::endl;
42
43 ArgMin<int, float> ArgMinF2("floatArgMin");
44 std::cout << ArgMinF2.compute(tf2) << std::endl;
45 ArgMinF2.setAttribute(attr_keepdims, 0);
46 std::cout << ArgMinF2.compute(tf2) << std::endl;
47 ArgMinF2.setAttribute(attr_keepdims, 1);
48 ArgMinF2.setAttribute(attr_axis, 1);
49 std::cout << ArgMinF2.compute(tf2) << std::endl;
50}
51#endif

Callers

nothing calls this directly

Calls 3

loadMethod · 0.45
computeMethod · 0.45
setAttributeMethod · 0.45

Tested by

no test coverage detected