aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortxh18 <[email protected]>2015-12-21 16:58:35 +0800
committertxh18 <[email protected]>2015-12-21 16:58:35 +0800
commit95ef51432218683ec90fdbaa2e92007f4fbd4610 (patch)
tree1568d445040facf5dbb53126864b0712c2d6380a
parent7f03ce8da24870f2757473385a75ed990b36d817 (diff)
added a garbace collect in tnn
-rw-r--r--nerv/tnn/tnn.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/nerv/tnn/tnn.lua b/nerv/tnn/tnn.lua
index 7ae3172..5351053 100644
--- a/nerv/tnn/tnn.lua
+++ b/nerv/tnn/tnn.lua
@@ -77,6 +77,7 @@ function TNN.make_initial_store(st, p, dim, batch_size, chunk_size, extend_t, gl
st_c[i + t_c][p_c] = st[i][p]
end
end
+ collectgarbage("collect") --free the old one to save memory
end
function TNN:out_of_feedrange(t) --out of chunk, or no input, for the current feed