Skip to content
fn

avg_pool3d_backward_f32

void avg_pool3d_backward_f32(const float * g, float * dx, int B, int C, int D, int H, int W, int KD, int KH, int KW, int OD, int OH, int OW, int sd, int sh, int sw, int pd, int ph, int pw, bool count_include_pad)

Single-precision 3-D average-pool backward — broadcasts each upstream gradient back over its source window with the fixed 1/(KD*KH*KW) weight.

dx is accumulated and must be zeroed by the caller.

Parameters

gconst float*
Upstream gradient of shape (B, C, OD, OH, OW).
dxfloat*
Output gradient of shape (B, C, D, H, W); accumulated.
B, C, D, H, W, KD, KH, KW, OD, OH, OW, sd, sh, sw, pd, ph, pwint
Layout and window parameters matching the forward call.