diff --git a/paddle/function/CrossMapNormalOp.cpp b/paddle/function/CrossMapNormalOp.cpp index 568b8faef4566ac6246b2f592039e8799c3536e0..2d2ff0ca86820412e81df4d9cb5376a48e0020f6 100644 --- a/paddle/function/CrossMapNormalOp.cpp +++ b/paddle/function/CrossMapNormalOp.cpp @@ -126,6 +126,11 @@ void CrossMapNormalGrad(real* inputsGrad, * N /max(0, f-[N/2]) * * Argument in the Function: + * Input is NCHW format, while input.shape.ndims() is equal 4. + * And the meaning of each dimension(0-3) is respectively batch size, + * feature maps, rows and columns. + * The above formula is for each image. + * * \param size_ represent N * \param scale_ represent alpha / N * \param pow_ represent beta @@ -135,7 +140,7 @@ void CrossMapNormalGrad(real* inputsGrad, * * note: * Save output[1] is to simplify the backward calculation. - * So, if only consider the forward calculation, we can optimize to + * TODO, if only consider the forward calculation, we can optimize to * remove the output[1]. */ template @@ -192,6 +197,9 @@ private: * / * * Argument in the Function: + * The data of inputs/outputs format is the same as the forward interface + * and is NCHW. + * * \param size_ represent N * \param scale_ represent alpha / N * \param pow_ represent beta