Caffe2 - C++ API
A deep learning, cross platform ML framework
int8_roi_align_op.cc
1 #include "caffe2/operators/quantized/int8_roi_align_op.h"
2 
3 namespace caffe2 {
4 
5 REGISTER_CPU_OPERATOR(Int8RoIAlign, int8::Int8RoIAlignOp);
6 
7 OPERATOR_SCHEMA(Int8RoIAlign)
8  .NumInputs(2)
9  .NumOutputs(1)
10  .SetDoc(R"DOC(
11 Region of Interest (RoI) align operation as used in Mask R-CNN.
12 )DOC")
13  .Arg("Y_scale", "Output tensor quantization scale")
14  .Arg("Y_zero_point", "Output tensor quantization offset")
15  .Arg(
16  "spatial_scale",
17  "(float) default 1.0; Spatial scale of the input feature map X "
18  "relative to the input image. E.g., 0.0625 if X has a stride of 16 "
19  "w.r.t. the input image.")
20  .Arg("pooled_h", "(int) default 1; Pooled output Y's height.")
21  .Arg("pooled_w", "(int) default 1; Pooled output Y's width.")
22  .Arg(
23  "sampling_ratio",
24  "(int) default -1; number of sampling points in the interpolation grid "
25  "used to compute the output value of each pooled output bin. If > 0, "
26  "then exactly sampling_ratio x sampling_ratio grid points are used. If "
27  "<= 0, then an adaptive number of grid points are used (computed as "
28  "ceil(roi_width / pooled_w), and likewise for height).")
29  .Input(0, "X", "4D Int8 Tensor feature map input of shape (N, C, H, W).")
30  .Input(
31  1,
32  "RoIs",
33  "2D input of shape (R, 4 or 5) specifying R RoIs "
34  "representing: batch index in [0, N - 1], x1, y1, x2, y2. The RoI "
35  "coordinates are in the coordinate system of the input image. For "
36  "inputs corresponding to a single image, batch index can be excluded "
37  "to have just 4 columns.")
38  .Output(
39  0,
40  "Y",
41  "4D Int8 Tensor output of shape (R, C, pooled_h, pooled_w). "
42  "The r-th batch element "
43  "is a pooled feature map cooresponding to the r-th RoI.");
44 
45 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13