"git@developer.sourcefind.cn:modelzoo/seresnet50_mmcv.git" did not exist on "75cd9ac84509b392d8ed362f169b34701aa43806"
Commit 1644d4fc authored by Shucai Xiao's avatar Shucai Xiao
Browse files

add onnx tests for reduce_mean

parent 182d49dd
...@@ -14,7 +14,7 @@ namespace op { ...@@ -14,7 +14,7 @@ namespace op {
struct reduce_mean struct reduce_mean
{ {
std::vector<int> axes; std::vector<int64_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)
......
...@@ -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;
......
reducemean-example:}
0
xy"
ReduceMean*
axes@*
keepdimstest_reducemeanZ
x




b
y




B
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