microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ba200b4a0e391b45c0df4f9b1a506f0a9f574dd4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

test/static_test/test_math.cc

22lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4#include "gtest/gtest.h"
5#include <dlib/matrix.h>
6
7using namespace dlib;
8
9TEST(math, matrix_op) {
10 matrix<float> M(3,3);
11 M = 54.2, 7.4, 12.1,
12 1, 2, 3,
13 5.9, 0.05, 1;
14
15 matrix<float,3,1> y;
16 y = 3.5,
17 1.2,
18 7.8;
19
20 matrix<float> x = inv(M)*y;
21 EXPECT_FLOAT_EQ(x(1, 0), -13.909741);
22}
23