Skip to content
Snippets Groups Projects
Commit 51461929 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : [Conv] added check to ensure that dilation & stride values were all >= 1

parent 1c4e276a
No related branches found
No related tags found
No related merge requests found
...@@ -264,7 +264,15 @@ inline std::shared_ptr<Node> Conv( ...@@ -264,7 +264,15 @@ inline std::shared_ptr<Node> Conv(
[](DimSize_t val) { return val == 0; }), [](DimSize_t val) { return val == 0; }),
"Conv : at least of of the dilation dimension is 0, expecting " "Conv : at least of of the dilation dimension is 0, expecting "
"strictly positive values. Got {}", "strictly positive values. Got {}",
Conv_Op<DIM>::Type,
dilationDims); dilationDims);
AIDGE_ASSERT(!std::any_of(strideDims.cbegin(),
strideDims.cend(),
[](DimSize_t val) { return val == 0; }),
"{}: at least one of the stride dimension is 0, expecting "
"strictly positive values. Got {}.",
Conv_Op<DIM>::Type,
strideDims);
return Conv<DIM>(inChannels, outChannels, to_array(kernelDims), name, strideDims, dilationDims, noBias); return Conv<DIM>(inChannels, outChannels, to_array(kernelDims), name, strideDims, dilationDims, noBias);
} }
......
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