Skip to content

Commit

Permalink
fix bug with default parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
NHZlX committed Nov 13, 2017
1 parent 471573e commit 5aa3e76
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion paddle/cuda/include/stub/hl_cnn_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion paddle/gserver/layers/PoolProjection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down
2 changes: 1 addition & 1 deletion paddle/gserver/layers/PoolProjection.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class PoolProjection : public Projection {
static PoolProjection* create(const ProjectionConfig& config,
ParameterPtr parameter,
bool useGpu);

const std::string& getPoolType() const { return poolType_; }

size_t getSize();
Expand All @@ -63,5 +64,4 @@ class AvgPoolProjection : public PoolProjection {
virtual void forward();
virtual void backward(const UpdateCallback& callback = nullptr);
};

} // namespace paddle
1 change: 0 additions & 1 deletion paddle/gserver/layers/PoolProjectionLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5aa3e76

Please sign in to comment.