diff --git a/paddle/cuda/include/stub/hl_cnn_stub.h b/paddle/cuda/include/stub/hl_cnn_stub.h index fc22da024b92a3b49780544347901dd44217358d..968ed4840ffb0623b57bd6e6d839973e109394de 100644 --- a/paddle/cuda/include/stub/hl_cnn_stub.h +++ b/paddle/cuda/include/stub/hl_cnn_stub.h @@ -32,7 +32,7 @@ inline void hl_maxpool_forward(const int frameCnt, const int paddingW, real* tgtData, const int tgtStride, - real* MaskData = NULL) {} + real* MaskData) {} inline void hl_maxpool_backward(const int frameCnt, const real* inputData, diff --git a/paddle/gserver/layers/PoolProjection.cpp b/paddle/gserver/layers/PoolProjection.cpp index 5fa68b2c54539079c5f221548346fff50c697d61..d90b438448eb72e72e22e9a91a3cbcd84ac7e6cb 100644 --- a/paddle/gserver/layers/PoolProjection.cpp +++ b/paddle/gserver/layers/PoolProjection.cpp @@ -84,7 +84,6 @@ void MaxPoolProjection::forward() { CHECK_EQ(width, out_->value->getWidth()); MatrixPtr inputV = in_->value; MatrixPtr outV = out_->value; - outV->maxPoolForward(*inputV, imgSizeY_, imgSize_, diff --git a/paddle/gserver/layers/PoolProjection.h b/paddle/gserver/layers/PoolProjection.h index ce0584d7b0facf76af93f91a2cf57779461bfb68..9a75f465f6fbb2f2a928b0e36fcfbe0e510d7b3a 100644 --- a/paddle/gserver/layers/PoolProjection.h +++ b/paddle/gserver/layers/PoolProjection.h @@ -37,6 +37,7 @@ public: static PoolProjection* create(const ProjectionConfig& config, ParameterPtr parameter, bool useGpu); + const std::string& getPoolType() const { return poolType_; } size_t getSize(); @@ -63,5 +64,4 @@ public: virtual void forward(); virtual void backward(const UpdateCallback& callback = nullptr); }; - } // namespace paddle diff --git a/paddle/gserver/layers/PoolProjectionLayer.cpp b/paddle/gserver/layers/PoolProjectionLayer.cpp index 7334c3b051b44e576227b09780b9a7b72cb70584..ed5011ab8990620acb12f3ca6c488ce403336d45 100644 --- a/paddle/gserver/layers/PoolProjectionLayer.cpp +++ b/paddle/gserver/layers/PoolProjectionLayer.cpp @@ -51,7 +51,6 @@ void PoolProjectionLayer::forward(PassType passType) { const Argument& in = getInput(0); int batchSize = in.value->getHeight(); int size = getSize(); - resetOutput(batchSize, size); poolProjection_->forward(&in, &output_, passType); }