提交 5aa3e768 编写于 作者: X xzl

fix bug with default parameter

上级 471573ef
...@@ -32,7 +32,7 @@ inline void hl_maxpool_forward(const int frameCnt, ...@@ -32,7 +32,7 @@ inline void hl_maxpool_forward(const int frameCnt,
const int paddingW, const int paddingW,
real* tgtData, real* tgtData,
const int tgtStride, const int tgtStride,
real* MaskData = NULL) {} real* MaskData) {}
inline void hl_maxpool_backward(const int frameCnt, inline void hl_maxpool_backward(const int frameCnt,
const real* inputData, const real* inputData,
......
...@@ -84,7 +84,6 @@ void MaxPoolProjection::forward() { ...@@ -84,7 +84,6 @@ void MaxPoolProjection::forward() {
CHECK_EQ(width, out_->value->getWidth()); CHECK_EQ(width, out_->value->getWidth());
MatrixPtr inputV = in_->value; MatrixPtr inputV = in_->value;
MatrixPtr outV = out_->value; MatrixPtr outV = out_->value;
outV->maxPoolForward(*inputV, outV->maxPoolForward(*inputV,
imgSizeY_, imgSizeY_,
imgSize_, imgSize_,
......
...@@ -37,6 +37,7 @@ public: ...@@ -37,6 +37,7 @@ public:
static PoolProjection* create(const ProjectionConfig& config, static PoolProjection* create(const ProjectionConfig& config,
ParameterPtr parameter, ParameterPtr parameter,
bool useGpu); bool useGpu);
const std::string& getPoolType() const { return poolType_; } const std::string& getPoolType() const { return poolType_; }
size_t getSize(); size_t getSize();
...@@ -63,5 +64,4 @@ public: ...@@ -63,5 +64,4 @@ public:
virtual void forward(); virtual void forward();
virtual void backward(const UpdateCallback& callback = nullptr); virtual void backward(const UpdateCallback& callback = nullptr);
}; };
} // namespace paddle } // namespace paddle
...@@ -51,7 +51,6 @@ void PoolProjectionLayer::forward(PassType passType) { ...@@ -51,7 +51,6 @@ void PoolProjectionLayer::forward(PassType passType) {
const Argument& in = getInput(0); const Argument& in = getInput(0);
int batchSize = in.value->getHeight(); int batchSize = in.value->getHeight();
int size = getSize(); int size = getSize();
resetOutput(batchSize, size); resetOutput(batchSize, size);
poolProjection_->forward(&in, &output_, passType); poolProjection_->forward(&in, &output_, passType);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册