Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fixed flaky test issue for test_operator_gpu.test_convolution_grouping (
Browse files Browse the repository at this point in the history
#12385)

* fixed flaky test issue for test_operator_gpu.test_convolution_grouping

* Changed implicit cast to explicit cast
  • Loading branch information
mseth10 authored and anirudh2290 committed Sep 1, 2018
1 parent b8ee84b commit 10e94f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,6 @@ def check_batchnorm_training(stype):
check_batchnorm_training('default')


@unittest.skip("Flaky test https://github.com/apache/incubator-mxnet/issues/12219")
@with_seed()
def test_convolution_grouping():
for dim in [1, 2, 3]:
Expand All @@ -1606,15 +1605,15 @@ def test_convolution_grouping():
exe1 = y1.simple_bind(default_context(), x=shape)
exe2 = y2.simple_bind(default_context(), x=shape, w=(num_filter, shape[1]//num_group) + kernel, b=(num_filter,))
for arr1, arr2 in zip(exe1.arg_arrays, exe2.arg_arrays):
arr1[:] = np.random.normal(size=arr1.shape)
arr1[:] = np.float32(np.random.normal(size=arr1.shape))
arr2[:] = arr1
exe1.forward(is_train=True)
exe1.backward(exe1.outputs[0])
exe2.forward(is_train=True)
exe2.backward(exe2.outputs[0])

for arr1, arr2 in zip(exe1.outputs + exe1.grad_arrays, exe2.outputs + exe2.grad_arrays):
np.testing.assert_allclose(arr1.asnumpy(), arr2.asnumpy(), rtol=1e-3, atol=1e-4)
np.testing.assert_allclose(arr1.asnumpy(), arr2.asnumpy(), rtol=1e-3, atol=1e-3)


@unittest.skip("Flaky test https://github.com/apache/incubator-mxnet/issues/12203")
Expand Down

0 comments on commit 10e94f8

Please sign in to comment.