szha commented on a change in pull request #20186:
URL: https://github.com/apache/incubator-mxnet/pull/20186#discussion_r615485488
##########
File path: src/operator/nn/convolution.cc
##########
@@ -99,6 +99,8 @@ static bool ConvolutionShape(const nnvm::NodeAttrs& attrs,
// 1d conv
CHECK_EQ(dshp.ndim(), 3U) << "Input data should be 3D in
batch-num_filter-x";
Shape<3> dshape = ConvertLayout(dshp.get<3>(), param_.layout.value(),
kNCW);
+ CHECK_NE(param_.num_group, 0U) \
+ << "num_group must be non-zero";
Review comment:
- the `num_group` argument can't be negative either so it would be
better to check for `CHECK_GT(..., 0)`
- It would be better to report the received number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]