From c1c07bbef65deb2ca91554c3110b15b35a71dd5e Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Fri, 23 Sep 2016 17:22:46 +0800 Subject: [PATCH] Update CudnnConvLayer.cpp --- paddle/gserver/layers/CudnnConvLayer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/gserver/layers/CudnnConvLayer.cpp b/paddle/gserver/layers/CudnnConvLayer.cpp index a395a7223e394f..0f932f960f6bac 100644 --- a/paddle/gserver/layers/CudnnConvLayer.cpp +++ b/paddle/gserver/layers/CudnnConvLayer.cpp @@ -133,6 +133,8 @@ void CudnnConvLayer::reshape(int batchSize) { getOutput().setFrameHeight(outputH_); getOutput().setFrameWidth(outputW_); + // if the batchSize remains the same, set isSelectAlgo_ true. + // Otherwise, set isSelectAlgo_ false and select algo again. isSelectAlgo_ = (batchSize == batchNum_); batchNum_ = batchSize;