roi_align.h 1.23 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 roi_align(
10
11
12
13
14
15
16
17
    const at::Tensor& input,
    const at::Tensor& rois,
    double spatial_scale,
    int64_t pooled_height,
    int64_t pooled_width,
    int64_t sampling_ratio,
    bool aligned);

Edward Z. Yang's avatar
Edward Z. Yang committed
18
19
20
21
22
23
24
25
26
VISION_API at::Tensor roi_align_symint(
    const at::Tensor& input,
    const at::Tensor& rois,
    double spatial_scale,
    c10::SymInt pooled_height,
    c10::SymInt pooled_width,
    int64_t sampling_ratio,
    bool aligned);

27
28
namespace detail {

29
at::Tensor _roi_align_backward(
30
31
32
33
34
35
36
37
38
39
40
41
    const at::Tensor& grad,
    const at::Tensor& rois,
    double spatial_scale,
    int64_t pooled_height,
    int64_t pooled_width,
    int64_t batch_size,
    int64_t channels,
    int64_t height,
    int64_t width,
    int64_t sampling_ratio,
    bool aligned);

Edward Z. Yang's avatar
Edward Z. Yang committed
42
43
44
45
46
47
48
49
50
51
52
53
54
at::Tensor _roi_align_backward_symint(
    const at::Tensor& grad,
    const at::Tensor& rois,
    double spatial_scale,
    c10::SymInt pooled_height,
    c10::SymInt pooled_width,
    c10::SymInt batch_size,
    c10::SymInt channels,
    c10::SymInt height,
    c10::SymInt width,
    int64_t sampling_ratio,
    bool aligned);

55
56
} // namespace detail

57
58
} // namespace ops
} // namespace vision