Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
ef58f596
Commit
ef58f596
authored
6 years ago
by
MORITA Kazutaka
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix relu tests (#1149)
parent
01a99b9b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
topi/tests/python/test_topi_relu.py
+1
-1
topi/tests/python_cpp/test_topi_relu.py
+1
-1
No files found.
topi/tests/python/test_topi_relu.py
View file @
ef58f596
...
@@ -9,7 +9,7 @@ def verify_relu(m, n):
...
@@ -9,7 +9,7 @@ def verify_relu(m, n):
A
=
tvm
.
placeholder
((
m
,
n
),
name
=
'A'
)
A
=
tvm
.
placeholder
((
m
,
n
),
name
=
'A'
)
B
=
topi
.
nn
.
relu
(
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
)
b_np
=
a_np
*
(
a_np
>
0
)
def
check_device
(
device
):
def
check_device
(
device
):
...
...
This diff is collapsed.
Click to expand it.
topi/tests/python_cpp/test_topi_relu.py
View file @
ef58f596
...
@@ -10,7 +10,7 @@ def verify_relu(m, n, dtype):
...
@@ -10,7 +10,7 @@ def verify_relu(m, n, dtype):
B
=
topi
.
cpp
.
nn
.
relu
(
A
)
B
=
topi
.
cpp
.
nn
.
relu
(
A
)
assert
B
.
dtype
==
dtype
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
)
b_np
=
a_np
*
(
a_np
>
0
)
def
check_device
(
device
):
def
check_device
(
device
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment