Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
b93f5320
Unverified
Commit
b93f5320
authored
May 10, 2019
by
mvermeulen
Committed by
GitHub
May 10, 2019
Browse files
Merge pull request #259 from ROCmSoftwarePlatform/relu6_op
add relu6 op
parents
63036c34
6f83c775
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
src/tf/tf.cpp
src/tf/tf.cpp
+1
-0
test/tf/relu6_test.pb
test/tf/relu6_test.pb
+8
-0
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+10
-0
No files found.
src/tf/tf.cpp
View file @
b93f5320
...
@@ -108,6 +108,7 @@ struct tf_parser
...
@@ -108,6 +108,7 @@ struct tf_parser
{
{
add_generic_op
(
"Identity"
,
op
::
identity
{});
add_generic_op
(
"Identity"
,
op
::
identity
{});
add_generic_op
(
"Relu"
,
op
::
relu
{});
add_generic_op
(
"Relu"
,
op
::
relu
{});
add_generic_op
(
"Relu6"
,
op
::
clip
{
6.0
,
0.0
});
add_binary_op
(
"Add"
,
op
::
add
{});
add_binary_op
(
"Add"
,
op
::
add
{});
add_binary_op
(
"Mul"
,
op
::
mul
{});
add_binary_op
(
"Mul"
,
op
::
mul
{});
...
...
test/tf/relu6_test.pb
0 → 100644
View file @
b93f5320
:
0Placeholder*
dtype0*
shape:
relu6Relu60*
T0"
\ No newline at end of file
test/tf/tf_test.cpp
View file @
b93f5320
...
@@ -253,6 +253,16 @@ TEST_CASE(relu_test)
...
@@ -253,6 +253,16 @@ TEST_CASE(relu_test)
EXPECT
(
p
==
prog
);
EXPECT
(
p
==
prog
);
}
}
TEST_CASE
(
relu6_test
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
16
,
16
}});
p
.
add_instruction
(
migraphx
::
op
::
clip
{
6.0
,
0.0
},
l0
);
auto
prog
=
migraphx
::
parse_tf
(
"relu6_test.pb"
,
false
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
reshape_test
)
TEST_CASE
(
reshape_test
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
...
...
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