提交 bf08e5d9 编写于 作者: D dangqingqing

modify code comments.

上级 73192bb1
...@@ -20,20 +20,18 @@ limitations under the License. */ ...@@ -20,20 +20,18 @@ limitations under the License. */
/** /**
* @brief batch norm inferece. * @brief batch norm inferece.
* *
* @param[in] input input data. * @param[in] input input data.
* @param[out] output output data. * @param[out] output output data.
* @param[in] scale batch normalization scale parameter (in original * @param[in] scale batch normalization scale parameter (in original
* paper scale is referred to as gamma). * paper scale is referred to as gamma).
* @param[in] bias batch normalization bias parameter (in original * @param[in] bias batch normalization bias parameter (in original
* paper scale is referred to as beta). * paper scale is referred to as beta).
* @param[in] estimatedMean * @param[in] estimatedMean
* @param[in] estimatedVar It is suggested that resultRunningMean, * @param[in] estimatedVar The moving mean and variance
* resultRunningVariance from the * accumulated during the training phase are passed
* cudnnBatchNormalizationForwardTraining call * as inputs here.
* accumulated during the training phase are passed * @param[in] epsilon Epsilon value used in the batch
* as inputs here. * normalization formula.
* @param[in] epsilon Epsilon value used in the batch
* normalization formula.
*/ */
extern void hl_batch_norm_cuda_inference(const real* input, extern void hl_batch_norm_cuda_inference(const real* input,
real* output, real* output,
......
...@@ -81,8 +81,8 @@ void CudnnBatchNormLayer::forward(PassType passType) { ...@@ -81,8 +81,8 @@ void CudnnBatchNormLayer::forward(PassType passType) {
} else { } else {
// used movingMean and movingVar in testing // used movingMean and movingVar in testing
if (batchSize > 1024) { if (batchSize > 1024) {
// when batchSize is larger than 1024, there is a bug // there is a bug in cudnn library when the batch size
// in cudnn library. // is larger than 1024.
hl_batch_norm_cuda_inference(input, hl_batch_norm_cuda_inference(input,
output, output,
gamma, gamma,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册