From 0adac8c08c0e94d0a8a6aa81ae64f2efb4591c89 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Mon, 1 Jul 2024 00:20:48 +0200 Subject: [PATCH] Working version --- .../aidge/backend/cpu/operator/FoldImpl_forward_kernels.hpp | 4 ++-- unit_tests/operator/Test_FoldImpl.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/aidge/backend/cpu/operator/FoldImpl_forward_kernels.hpp b/include/aidge/backend/cpu/operator/FoldImpl_forward_kernels.hpp index 81b96d4b..e2db9475 100644 --- a/include/aidge/backend/cpu/operator/FoldImpl_forward_kernels.hpp +++ b/include/aidge/backend/cpu/operator/FoldImpl_forward_kernels.hpp @@ -52,8 +52,8 @@ void FoldImpl2D_cpu_forward_kernel(const Fold_Op<2>::Attrs &attrs, const std::ve for (DimSize_t n = 0; n < dims[0]; ++n) { for (DimSize_t outC = 0; outC < outChannels; ++outC) { - const auto inOffsetH = outC % kernelDims[1]; - const auto inOffsetW = (outC / kernelDims[1]) % kernelDims[0]; + const auto inOffsetW = outC % kernelDims[1]; + const auto inOffsetH = (outC / kernelDims[1]) % kernelDims[0]; const auto inC = outC / kernelDims[0] / kernelDims[1]; for (DimSize_t outH = 0; outH < outHeight; ++outH) { diff --git a/unit_tests/operator/Test_FoldImpl.cpp b/unit_tests/operator/Test_FoldImpl.cpp index 010b23d3..6832f5a4 100644 --- a/unit_tests/operator/Test_FoldImpl.cpp +++ b/unit_tests/operator/Test_FoldImpl.cpp @@ -173,6 +173,6 @@ TEST_CASE("[cpu/operator] Fold(forward)", "[Fold][CPU]") { SequentialScheduler scheduler(g); scheduler.forward(); - opFold->getOutput(0)->print(); + //opFold->getOutput(0)->print(); REQUIRE(*(opFold->getOutput(0)) == *myOutput); } \ No newline at end of file -- GitLab