Caffe2 - C++ API
A deep learning, cross platform ML framework
roi_align_rotated_gradient_op.cc
1 #include "roi_align_rotated_gradient_op.h"
2 
3 #include "caffe2/utils/eigen_utils.h"
4 #include "caffe2/utils/math.h"
5 
6 namespace caffe2 {
7 
8 // Input: X, rois, dY (aka "gradOutput");
9 // Output: dX (aka "gradInput")
10 OPERATOR_SCHEMA(RoIAlignRotatedGradient)
11  .NumInputs(3)
12  .NumOutputs(1)
13  .Input(0, "X", "See RoIAlignRotated.")
14  .Input(1, "RoIs", "See RoIAlignRotated.")
15  .Input(2, "dY", "Gradient of forward output 0 (Y)")
16  .Output(0, "dX", "Gradient of forward input 0 (X)");
17 
18 namespace {
19 
20 class GetRoIAlignRotatedGradient : public GradientMakerBase {
21  using GradientMakerBase::GradientMakerBase;
22  vector<OperatorDef> GetGradientDefs() override {
23  return SingleGradientDef(
24  "RoIAlignRotatedGradient",
25  "",
26  vector<string>{I(0), I(1), GO(0)},
27  vector<string>{GI(0)});
28  }
29 };
30 
31 } // namespace
32 
33 REGISTER_GRADIENT(RoIAlignRotated, GetRoIAlignRotatedGradient);
34 
35 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13