Commit ef58f596 by MORITA Kazutaka Committed by Tianqi Chen

fix relu tests (#1149)

parent 01a99b9b
......@@ -9,7 +9,7 @@ def verify_relu(m, n):
A = tvm.placeholder((m, n), name='A')
B = topi.nn.relu(A)
a_np = np.random.uniform(size=get_const_tuple(A.shape)).astype(A.dtype)
a_np = np.random.uniform(low=-1.0, high=1.0, size=get_const_tuple(A.shape)).astype(A.dtype)
b_np = a_np * (a_np > 0)
def check_device(device):
......
......@@ -10,7 +10,7 @@ def verify_relu(m, n, dtype):
B = topi.cpp.nn.relu(A)
assert B.dtype == dtype
a_np = np.random.uniform(size=get_const_tuple(A.shape)).astype(A.dtype)
a_np = np.random.uniform(low=-1.0, high=1.0, size=get_const_tuple(A.shape)).astype(A.dtype)
b_np = a_np * (a_np > 0)
def check_device(device):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment