deform_conv2d.h 1.91 KB
Newer Older
1
2
#pragma once

3
#include <ATen/ATen.h>
4
#include "../macros.h"
5
6
7
8

namespace vision {
namespace ops {

9
VISION_API at::Tensor deform_conv2d(
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
    const at::Tensor& input,
    const at::Tensor& weight,
    const at::Tensor& offset,
    const at::Tensor& mask,
    const at::Tensor& bias,
    int64_t stride_h,
    int64_t stride_w,
    int64_t pad_h,
    int64_t pad_w,
    int64_t dilation_h,
    int64_t dilation_w,
    int64_t groups,
    int64_t offset_groups,
    bool use_mask);

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
VISION_API at::Tensor deform_conv2d_symint(
    const at::Tensor& input,
    const at::Tensor& weight,
    const at::Tensor& offset,
    const at::Tensor& mask,
    const at::Tensor& bias,
    c10::SymInt stride_h,
    c10::SymInt stride_w,
    c10::SymInt pad_h,
    c10::SymInt pad_w,
    c10::SymInt dilation_h,
    c10::SymInt dilation_w,
    c10::SymInt groups,
    c10::SymInt offset_groups,
    bool use_mask);

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
namespace detail {

std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>
_deform_conv2d_backward(
    const at::Tensor& grad,
    const at::Tensor& input,
    const at::Tensor& weight,
    const at::Tensor& offset,
    const at::Tensor& mask,
    const at::Tensor& bias,
    int64_t stride_h,
    int64_t stride_w,
    int64_t pad_h,
    int64_t pad_w,
    int64_t dilation_h,
    int64_t dilation_w,
    int64_t groups,
    int64_t offset_groups,
    bool use_mask);

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>
_deform_conv2d_backward_symint(
    const at::Tensor& grad,
    const at::Tensor& input,
    const at::Tensor& weight,
    const at::Tensor& offset,
    const at::Tensor& mask,
    const at::Tensor& bias,
    c10::SymInt stride_h,
    c10::SymInt stride_w,
    c10::SymInt pad_h,
    c10::SymInt pad_w,
    c10::SymInt dilation_h,
    c10::SymInt dilation_w,
    c10::SymInt groups,
    c10::SymInt offset_groups,
    bool use_mask);

79
80
} // namespace detail

81
82
} // namespace ops
} // namespace vision