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:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2013-10-13 23:11:41 +0400
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2013-10-13 23:11:41 +0400
commitbea3665f9dbcd2a5248078d2c23903fcc973c6be (patch)
treee254ae219c51d2fc2f127f3d88cd444cb498a5ed /generic
parent8c295db66843c1119797ef3390f248af4777ec28 (diff)
move index declaragtion into pragma
Diffstat (limited to 'generic')
-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];