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

feat : [Conv] added check to ensure dilation & stride attributes values are strictly positive

parent d2a8b90f
No related branches found
No related tags found
1 merge request!319feat_operator_convtranspose
...@@ -240,15 +240,15 @@ std::shared_ptr<Aidge::Node> Aidge::Conv( ...@@ -240,15 +240,15 @@ std::shared_ptr<Aidge::Node> Aidge::Conv(
AIDGE_ASSERT(DIM<=MaxDim,"{}: Too many kernel dimensions required, maximum allowed : {} ", Conv_Op<DIM>::Type, MaxDim); AIDGE_ASSERT(DIM<=MaxDim,"{}: Too many kernel dimensions required, maximum allowed : {} ", Conv_Op<DIM>::Type, MaxDim);
AIDGE_ASSERT(!std::any_of(dilationDims.cbegin(), AIDGE_ASSERT(!std::any_of(dilationDims.cbegin(),
dilationDims.cend(), dilationDims.cend(),
[](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, Conv_Op<DIM>::Type,
dilationDims); dilationDims);
AIDGE_ASSERT(!std::any_of(strideDims.cbegin(), AIDGE_ASSERT(!std::any_of(strideDims.cbegin(),
strideDims.cend(), strideDims.cend(),
[](DimSize_t val) { return val == 0; }), [](DimSize_t val) { return val <= 0; }),
"{}: at least one of the stride dimension is 0, expecting " "{}: at least one of the stride dimension is 0, <=expecting "
"strictly positive values. Got {}.", "strictly positive values. Got {}.",
Conv_Op<DIM>::Type, Conv_Op<DIM>::Type,
strideDims); strideDims);
......
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