Skip to content

Commit 57c355a

Browse files
author
gaoyuan
committed
Remove redundancy codes
1 parent 549cf64 commit 57c355a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

paddle/gserver/layers/CrossChannelNormLayer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace paddle {
2121

2222
void CrossChannelNormLayer::forward(PassType passType) {
2323
Layer::forward(passType);
24-
auto in = getInput(0);
2524
MatrixPtr inV = getInputValue(0);
2625

2726
size_t batchSize = inV->getHeight();
@@ -36,7 +35,6 @@ void CrossChannelNormLayer::forward(PassType passType) {
3635
Matrix::resizeOrCreate(spatialBuffer_, 1, spatialDim, false, useGpu_);
3736
Matrix::resizeOrCreate(normBuffer_, batchSize, spatialDim, false, useGpu_);
3837
normBuffer_->zeroMem();
39-
spatialBuffer_->zeroMem();
4038
dataBuffer_->zeroMem();
4139
// add eps to avoid overflow
4240
normBuffer_->addScalar(*normBuffer_, 1e-6);
@@ -71,7 +69,6 @@ void CrossChannelNormLayer::backward(const UpdateCallback& callback) {
7169
MatrixPtr outG = getOutputGrad();
7270
MatrixPtr outV = getOutputValue();
7371

74-
auto in = getInput(0);
7572
size_t batchSize = inG->getHeight();
7673
size_t dataDim = inG->getWidth();
7774
size_t spatialDim = dataDim / channels_;

0 commit comments

Comments
 (0)