Skip to content

Commit cb5a7a8

Browse files
committed
Fix errors of GPU AvgPooling with the excludeMode argument
1 parent 192c00a commit cb5a7a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

paddle/cuda/include/hl_cnn.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ extern void hl_maxpool_backward(const int frameCnt,
116116
* @param[in] paddingW padding width.
117117
* @param[out] tgtData output data.
118118
* @param[in] tgtStride stride between output data samples.
119+
* @param[in] excludeMode whether to consider paddings for size.
119120
*
120121
*/
121122
extern void hl_avgpool_forward(const int frameCnt,
@@ -132,7 +133,8 @@ extern void hl_avgpool_forward(const int frameCnt,
132133
const int paddingH,
133134
const int paddingW,
134135
real* tgtData,
135-
const int tgtStride);
136+
const int tgtStride,
137+
bool excludeMode);
136138

137139
/**
138140
* @brief Maximum pool backward.
@@ -154,6 +156,7 @@ extern void hl_avgpool_forward(const int frameCnt,
154156
* @param[in] scaleB scale.
155157
* @param[out] backGrad output grad.
156158
* @param[in] outStride stride between output data samples.
159+
* @param[in] excludeMode whether to consider paddings for size.
157160
*
158161
*/
159162
extern void hl_avgpool_backward(const int frameCnt,
@@ -172,7 +175,8 @@ extern void hl_avgpool_backward(const int frameCnt,
172175
real scaleA,
173176
real scaleB,
174177
real* backGrad,
175-
const int outStride);
178+
const int outStride,
179+
bool excludeMode);
176180

177181
extern void hl_maxpool3D_forward(const int frameCnt,
178182
const real* inputData,

0 commit comments

Comments
 (0)