Poplar and PopLibs
ROIAlign.hpp
1
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
2
3
#ifndef popnn_ROIAlign_hpp
4
#define popnn_ROIAlign_hpp
5
#include <poplar/Program.hpp>
6
7
namespace
popnn::experimental {
8
24
struct
roiAlignParams
{
25
long
unsigned
int
samplingRatio_, alignedHeight_, alignedWidth_;
26
bool
aligned_;
27
float
spatialScale_;
28
roiAlignParams
(
long
unsigned
int
samplingRatio,
long
unsigned
int
poolH,
29
long
unsigned
int
poolW,
bool
aligned,
float
spatialScale)
30
: samplingRatio_{samplingRatio}, alignedHeight_{poolH},
31
alignedWidth_{poolW}, aligned_{aligned}, spatialScale_{spatialScale} {}
32
};
33
63
poplar::Tensor
64
roiAlignFwd(
poplar::Graph
&graph,
poplar::program::Sequence
&prog,
65
poplar::Tensor
&bottomData,
poplar::Tensor
&bottomRois,
66
poplar::Tensor
&bottomBatchIndex,
const
roiAlignParams
¶ms,
67
const
poplar::DebugContext
&debugContext = {});
68
99
poplar::Tensor
100
roiAlignInputGradient(
poplar::Graph
&graph,
poplar::program::Sequence
&prog,
101
poplar::Tensor
&bottomData,
poplar::Tensor
&bottomRois,
102
poplar::Tensor
&bottomBatchIndex,
103
poplar::Tensor
&topDataGrad,
const
roiAlignParams ¶ms,
104
const
poplar::DebugContext
&debugContext = {});
105
106
}
// namespace popnn::experimental
107
108
#endif
// popnn_ROIAlign_hpp
poplar::DebugContext
DebugContext gathers the common external parameters of the context of an operation.
Definition:
DebugContext.hpp:221
poplar::Graph
This class represents a graph program to be executed on the IPU.
Definition:
Graph.hpp:52
poplar::Tensor
A reference to a subset of tensor elements.
Definition:
Tensor.hpp:38
poplar::program::Sequence
Program that executes a sequence of programs.
Definition:
Program.hpp:77
popnn::experimental::roiAlignParams
parameters of ROIAlign
Definition:
ROIAlign.hpp:24
include
popnn
experimental
ROIAlign.hpp
Generated by
1.9.3