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
3 merge requests!414Update version 0.5.1 -> 0.6.0,!408[Add] Dropout Operator,!319feat_operator_convtranspose
......@@ -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(!std::any_of(dilationDims.cbegin(),
dilationDims.cend(),
[](DimSize_t val) { return val == 0; }),
"Conv : at least of of the dilation dimension is 0, expecting "
[](DimSize_t val) { return val <= 0; }),
"Conv : at least of of the dilation dimension is <= 0, expecting "
"strictly positive values. Got {}",
Conv_Op<DIM>::Type,
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 "
[](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);
......
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