Skip to content
Snippets Groups Projects
Commit 382f6d47 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed dimensions inversion

parent f82e2915
No related branches found
No related tags found
No related merge requests found
Pipeline #80204 failed
......@@ -633,8 +633,8 @@ void ConvImpl2D_cpu_forward_kernel(const array<DimSize_t, 2> &strideDims,
iIndex_channel +=
inputDims[3] * strideDims[0]) {
// loop over associated input line
for (std::size_t ky = 0, ix = 0; ky < kernelDims[1];
++ky, ix += inputDims[3] * dilationDims[0]) {
for (std::size_t kx = 0, ix = 0; kx < kernelDims[0];
++kx, ix += inputDims[3] * dilationDims[0]) {
// loop over the entire line
for (std::size_t oy = 0, iy = 0; oy < oySize;
++oy, iy += strideDims[1]) {
......@@ -642,12 +642,12 @@ void ConvImpl2D_cpu_forward_kernel(const array<DimSize_t, 2> &strideDims,
iIndex_channel + ix + iy;
// loop over elements assosicated with one
// output
for (std::size_t kx = 0; kx < kernelDims[0];
++kx) {
for (std::size_t ky = 0; ky < kernelDims[1];
++ky) {
output[oIndex + oy] +=
weights[wIndex + kernelDims[0] * ky +
kx] *
input[iIndex + kx * dilationDims[1]];
weights[wIndex + kernelDims[1] * kx +
ky] *
input[iIndex + ky * dilationDims[1]];
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment