From 6441be5a578c6fa8036192c295ae5f5aa91cc058 Mon Sep 17 00:00:00 2001 From: SimBe195 <37951951+SimBe195@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:32:40 +0100 Subject: [PATCH] Fix ONNX value creation based on FastMatrix (#81) --- src/Onnx/Value.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Onnx/Value.cc b/src/Onnx/Value.cc index 0fb9be41..aba15246 100644 --- a/src/Onnx/Value.cc +++ b/src/Onnx/Value.cc @@ -725,7 +725,7 @@ void Value::set(Math::FastMatrix const& mat, bool transpose) { // if we transpose we can iterate over both matrices linearly for (u32 c = 0u; c < mat.nColumns(); c++) { for (u32 r = 0u; r < mat.nRows(); r++) { - data[c * mat.nColumns() + r] = mat.at(r, c); + data[c * mat.nRows() + r] = mat.at(r, c); } } }