Skip to content

Commit 6441be5

Browse files
authored
Fix ONNX value creation based on FastMatrix (#81)
1 parent f0c58ed commit 6441be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Onnx/Value.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ void Value::set(Math::FastMatrix<T> const& mat, bool transpose) {
725725
// if we transpose we can iterate over both matrices linearly
726726
for (u32 c = 0u; c < mat.nColumns(); c++) {
727727
for (u32 r = 0u; r < mat.nRows(); r++) {
728-
data[c * mat.nColumns() + r] = mat.at(r, c);
728+
data[c * mat.nRows() + r] = mat.at(r, c);
729729
}
730730
}
731731
}

0 commit comments

Comments
 (0)