diff options
author | nicholas-leonard <nick@nikopia.org> | 2014-06-03 20:00:37 +0400 |
---|---|---|
committer | nicholas-leonard <nick@nikopia.org> | 2014-06-03 20:00:37 +0400 |
commit | f2b1a60fad4ab4cb8c51287743837142e21aabd4 (patch) | |
tree | 0196ab342c5a69bb47e66d4e87d8e002b2fcbc5d /generic | |
parent | ccd03d9820a78bfff07068997bab77c293d263de (diff) |
fixed SoftMaxTree.__init bug
Diffstat (limited to 'generic')
-rw-r--r-- | generic/SoftMaxTree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/SoftMaxTree.c b/generic/SoftMaxTree.c index 497e648..0c3b257 100644 --- a/generic/SoftMaxTree.c +++ b/generic/SoftMaxTree.c @@ -248,6 +248,7 @@ static int nn_(SoftMaxTree_accGradParameters)(lua_State *L) while(1) { long parentId, parentIdx, childIdx, nChildren; + double count; /* get next Node in Tree */ THIntTensor_select(node, childParent, 0, childId); parentId = (long)(THIntTensor_get1d(node, 0)) - 1; @@ -269,7 +270,7 @@ static int nn_(SoftMaxTree_accGradParameters)(lua_State *L) /* updates will contain parentId (key) sum of scales (value)*/ lua_pushinteger(L, (int)(parentId+1)); lua_gettable(L, -2); - double count = lua_tonumber(L, -1) + scale; + count = lua_tonumber(L, -1) + scale; lua_pop(L, 1); lua_pushinteger(L, (int)(parentId+1)); /* key */ |