Skip to content

Commit

Permalink
remove unused buffer in avg pooling
Browse files Browse the repository at this point in the history
  • Loading branch information
szagoruyko committed Dec 25, 2016
1 parent 55a794e commit d2a93c3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions generic/SpatialAveragePooling.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,8 @@ void THNN_(SpatialAveragePooling_updateGradInput)(
THNN_CHECK_DIM_SIZE(gradOutput, ndim, dimh, outputHeight);
THNN_CHECK_DIM_SIZE(gradOutput, ndim, dimw, outputWidth);

input_data = THTensor_(data)(input);

THTensor_(resizeAs)(gradInput, input);

input = THTensor_(newContiguous)(input);
gradOutput = THTensor_(newContiguous)(gradOutput);
THArgCheck(THTensor_(isContiguous)(gradInput), 4, "gradInput must be contiguous");

Expand Down Expand Up @@ -326,7 +323,6 @@ void THNN_(SpatialAveragePooling_updateGradInput)(
}
}

THTensor_(free)(input);
THTensor_(free)(gradOutput);
}

Expand Down

0 comments on commit d2a93c3

Please sign in to comment.