From 7acd669ee291d42492dd9f6d5a9716ab2f5ac314 Mon Sep 17 00:00:00 2001 From: hedaoyuan Date: Sun, 22 Jan 2017 16:25:19 +0800 Subject: [PATCH] Supplement the data format specifications for the parameters. --- paddle/function/CrossMapNormalOp.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/paddle/function/CrossMapNormalOp.cpp b/paddle/function/CrossMapNormalOp.cpp index 568b8faef..2d2ff0ca8 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 -- GitLab