Skip to content
Snippets Groups Projects
Commit 71432ea1 authored by Maxence Naud's avatar Maxence Naud
Browse files

Merge branch 'dev' into memorize

parents 13b2b49d b7d782f6
No related branches found
No related tags found
2 merge requests!50version 0.2.0,!37Support for recurrent networks
Pipeline #40545 failed
...@@ -91,16 +91,10 @@ void Aidge::DivImpl_cpu::forward() { ...@@ -91,16 +91,10 @@ void Aidge::DivImpl_cpu::forward() {
std::size_t contiguousIdx = nbDims - 1; std::size_t contiguousIdx = nbDims - 1;
for (; contiguousIdx+1 > 0; --contiguousIdx) { for (; contiguousIdx+1 > 0; --contiguousIdx) {
if (dims0[contiguousIdx] != dims1[contiguousIdx]) { if (dims0[contiguousIdx] != dims1[contiguousIdx]) {
if (contiguousIdx == (nbDims -1)) { if (contiguousIdx == (nbDims -1)) { // last dimensions of one of the input Tensor are of size 1
if (dims0[contiguousIdx] == 1) { const std::vector<std::size_t>& dims = (dims0[contiguousIdx] == 1) ? dims0 : dims1;
while ((dims0[contiguousIdx] == 1) && (contiguousIdx+1 > 0)) { while ((contiguousIdx+1 > 0) && (dims[contiguousIdx] == 1)) {
--contiguousIdx; --contiguousIdx;
}
}
else {
while ((dims1[contiguousIdx] == 1) && (contiguousIdx+1 > 0)) {
--contiguousIdx;
}
} }
} }
break; break;
......
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