This is an automated email from the ASF dual-hosted git repository. haibin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new d528453 [MXNET-473] Fix for dist_sync_kvstore (#11058) d528453 is described below commit d52845372ddfa3275d0f589cd32944f3a64f7760 Author: Hao Jin <haoj...@users.noreply.github.com> AuthorDate: Fri May 25 16:14:41 2018 -0700 [MXNET-473] Fix for dist_sync_kvstore (#11058) [MXNET-473] Fix for dist_sync_kvstore and test_operator.test_op_roi_align --- src/operator/tensor/elemwise_binary_op-inl.h | 2 +- tests/python/unittest/test_operator.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/operator/tensor/elemwise_binary_op-inl.h b/src/operator/tensor/elemwise_binary_op-inl.h index 2cf6481..c74f1f9 100644 --- a/src/operator/tensor/elemwise_binary_op-inl.h +++ b/src/operator/tensor/elemwise_binary_op-inl.h @@ -552,7 +552,7 @@ void ElemwiseBinaryOp::DnsRspDnsOp(mshadow::Stream<xpu> *s, TBlob rsp_data = rsp.data(); TBlob rsp_indices = rsp.aux_data(rowsparse::kIdx); - MSHADOW_SGL_DBL_TYPE_SWITCH(rsp_data.type_flag_, DType, { + MSHADOW_TYPE_SWITCH(rsp_data.type_flag_, DType, { MSHADOW_IDX_TYPE_SWITCH(rsp_indices.type_flag_, IType, { MXNET_ASSIGN_REQ_SWITCH(req, Req, { if (reverse && std::is_same<OP, mshadow_op::minus>::value) { diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index c5bdee1..3f08971 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -6019,7 +6019,7 @@ def test_context_num_gpus(): if str(e).find("CUDA") == -1: raise e - + @with_seed() def test_op_roi_align(): # Adapted from https://github.com/wkcn/MobulaOP/blob/master/tests/test_roi_align_op.py @@ -6146,7 +6146,7 @@ def test_op_roi_align(): real_output, [dx, drois] = roialign_forward_backward(data.asnumpy(), rois.asnumpy(), pooled_size, spatial_scale, sampling_ratio, dy.asnumpy()) assert np.allclose(output.asnumpy(), real_output) # It seems that the precision between Cfloat and Pyfloat is different. - assert np.allclose(data.grad.asnumpy(), dx, atol = 1e-6), np.abs(data.grad.asnumpy() - dx).max() + assert np.allclose(data.grad.asnumpy(), dx, atol = 1e-5), np.abs(data.grad.asnumpy() - dx).max() assert np.allclose(rois.grad.asnumpy(), drois) # modified from test_roipooling() -- To stop receiving notification emails like this one, please contact hai...@apache.org.