Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
1644d4fc
"git@developer.sourcefind.cn:modelzoo/seresnet50_mmcv.git" did not exist on "75cd9ac84509b392d8ed362f169b34701aa43806"
Commit
1644d4fc
authored
Jul 03, 2019
by
Shucai Xiao
Browse files
add onnx tests for reduce_mean
parent
182d49dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
1 deletion
+40
-1
src/include/migraphx/op/reduce_mean.hpp
src/include/migraphx/op/reduce_mean.hpp
+1
-1
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+21
-0
test/onnx/reducemean_test1.onnx
test/onnx/reducemean_test1.onnx
+0
-0
test/onnx/reducemean_test2.onnx
test/onnx/reducemean_test2.onnx
+18
-0
No files found.
src/include/migraphx/op/reduce_mean.hpp
View file @
1644d4fc
...
@@ -14,7 +14,7 @@ namespace op {
...
@@ -14,7 +14,7 @@ namespace op {
struct
reduce_mean
struct
reduce_mean
{
{
std
::
vector
<
int
>
axes
;
std
::
vector
<
int
64_t
>
axes
;
template
<
class
Self
,
class
F
>
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
static
auto
reflect
(
Self
&
self
,
F
f
)
...
...
test/onnx/onnx_test.cpp
View file @
1644d4fc
...
@@ -848,6 +848,27 @@ TEST_CASE(reducesum_test3)
...
@@ -848,6 +848,27 @@ TEST_CASE(reducesum_test3)
EXPECT
(
p
==
prog
);
EXPECT
(
p
==
prog
);
}
}
TEST_CASE
(
reducemean_test1
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}});
auto
l1
=
p
.
add_instruction
(
migraphx
::
op
::
reduce_mean
{{
2
,
3
}},
l0
);
p
.
add_instruction
(
migraphx
::
op
::
squeeze
{{
2
,
3
}},
l1
);
auto
prog
=
migraphx
::
parse_onnx
(
"reducemean_test1.onnx"
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
reducemean_test2
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}});
auto
l1
=
p
.
add_instruction
(
migraphx
::
op
::
reduce_sum
{{
2
}},
l0
);
auto
prog
=
migraphx
::
parse_onnx
(
"reducemean_test2.onnx"
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
clip_test
)
TEST_CASE
(
clip_test
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
...
...
test/onnx/reducemean_test1.onnx
0 → 100644
View file @
1644d4fc
File added
test/onnx/reducemean_test2.onnx
0 → 100644
View file @
1644d4fc
reducemean-example:}
0
xy"
ReduceMean*
axes@*
keepdimstest_reducemeanZ
x
b
y
B
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