"src/targets/vscode:/vscode.git/clone" did not exist on "dd6523c90f277d465e6ccaf6b1b4fe5ddd857350"
test_conv_relu.cpp 722 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_conv_relu : verify_program<test_conv_relu>
{
    migraphx::program create_program() const
    {
        migraphx::program p;
12
        auto* mm = p.get_main_module();
13
        auto input =
14
            mm->add_parameter("x", migraphx::shape{migraphx::shape::float_type, {4, 3, 3, 3}});
15
        auto weights =
16
            mm->add_parameter("w", migraphx::shape{migraphx::shape::float_type, {4, 3, 3, 3}});
17
18
        auto conv = mm->add_instruction(migraphx::make_op("convolution"), input, weights);
        mm->add_instruction(migraphx::make_op("relu"), conv);
19
20
21
        return p;
    }
};