test_deconv_1d.cpp 767 Bytes
Newer Older
1
2
3
4

#include "verify_program.hpp"
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
5
#include <migraphx/make_op.hpp>
6
7
8
9
10
11

struct test_deconv_1d : verify_program<test_deconv_1d>
{
    migraphx::program create_program() const
    {
        migraphx::program p;
12
13
14
        auto* mm = p.get_main_module();
        auto input =
            mm->add_parameter("x", migraphx::shape{migraphx::shape::float_type, {1, 1, 3}});
15
        auto weights =
16
            mm->add_parameter("w", migraphx::shape{migraphx::shape::float_type, {1, 1, 3}});
17
18
19
20
21
        mm->add_instruction(
            migraphx::make_op("deconvolution",
                              {{"padding", {0}}, {"stride", {1}}, {"dilation", {1}}}),
            input,
            weights);
22
23
24
        return p;
    }
};