You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ha...@apache.org on 2018/01/27 05:19:23 UTC

[incubator-mxnet] branch master updated: Force the dtype of data to be float32 for test_correlation (#9581)

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 f1ae225  Force the dtype of data to be float32 for test_correlation (#9581)
f1ae225 is described below

commit f1ae225b56659b743b2661c6987ff07d7c4ee40f
Author: Anirudh Subramanian <an...@gmail.com>
AuthorDate: Fri Jan 26 21:19:19 2018 -0800

    Force the dtype of data to be float32 for test_correlation (#9581)
---
 tests/python/unittest/test_operator.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py
index d169a54..742d055 100644
--- a/tests/python/unittest/test_operator.py
+++ b/tests/python/unittest/test_operator.py
@@ -2072,7 +2072,9 @@ def correlation_backward(out_grad,tmp1,tmp2,data1,data2,pad_size,kernel_size,str
 def unittest_correlation(data_shape,kernel_size,max_displacement,stride1,stride2,pad_size,is_multiply):
 
     img1 = np.random.random(data_shape)
+    img1 = img1.astype(np.float32)
     img2 = np.random.random(data_shape)
+    img2 = img2.astype(np.float32)
 
     net1 = get_correlation(img1,img2,kernel_size,max_displacement,stride1,stride2,pad_size,is_multiply)
     net2 = get_correlation(img1,img2,kernel_size,max_displacement,stride1,stride2,pad_size,is_multiply )

-- 
To stop receiving notification emails like this one, please contact
haibin@apache.org.