Zha0q1 commented on issue #20265: URL: https://github.com/apache/incubator-mxnet/issues/20265#issuecomment-843570689
Here is the source code of the first test case `test_operator.test_convolution_grouping ` https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_operator.py#L1674-L1703 ```python @with_seed() def test_convolution_grouping(): for dim in [1, 2, 3]: num_filter = 4 for num_group in [1, 2]: kernel = (3,) * dim shape = (1, 4) + (9,) * dim ``` The test will only fail when `dim=2` and `num_group=2`, i.e. when `kernel=(3, 3)` and `shape=(1, 4, 9, 9)`. So the test case will check if the Conv op will produce the same output and gradients (for x, w, b) when `num_group=2` as those of when we do the "grouping" manually. So it looks like for all of output, x gradient, w gradient, and b gradient the first halves of then tensors are the same, but the second halves differ. ``` Mismatched elements: 98 / 196 (50%) Max absolute difference: 16.347755 Max relative difference: 23.329699 x: array([[[[ 1.597207e-01, 1.540166e+00, 6.755731e+00, -5.728347e+00, 1.296894e+00, -1.326614e+00, 6.375989e+00], [ 1.170041e+00, 3.974693e-01, 5.603638e+00, -1.179677e+00,... y: array([[[[ 1.597207e-01, 1.540166e+00, 6.755731e+00, -5.728347e+00, 1.296894e+00, -1.326614e+00, 6.375989e+00], [ 1.170040e+00, 3.974691e-01, 5.603638e+00, -1.179677e+00,... ``` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
