Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generic/TemporalMaxPooling.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/TemporalMaxPooling.c b/generic/TemporalMaxPooling.c
index 5e269cf..3c0384d 100644
--- a/generic/TemporalMaxPooling.c
+++ b/generic/TemporalMaxPooling.c
@@ -18,7 +18,7 @@ static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L)
real *output_data;
real *indices_data;
- long t, x, y;
+ long t, y;
luaL_argcheck(L, input->nDimension == 2, 2, "2D tensor expected");
luaL_argcheck(L, input->size[0] >= kW, 2, "input sequence smaller than kernel size");
@@ -53,6 +53,7 @@ static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L)
/* compute local max: */
long maxindex = -1;
real maxval = -THInf;
+ long x;
for(x = 0; x < kW; x++)
{
real val = ip[x*framesize+y];