diff options
author | Determinant <[email protected]> | 2015-05-28 12:59:30 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-28 12:59:30 +0800 |
commit | 9791a4c03cd6ae0f7403daa8f6ba84b6c523c5a7 (patch) | |
tree | fa35de648494ec3e6be43cd3ae8a9ee12070e7f7 /examples/cumatrix_from_mmatrix.lua | |
parent | 51ee28426b992b1421ded46721ade7a57b0a1896 (diff) |
change softmax to in-place operation and fix memory leak
Diffstat (limited to 'examples/cumatrix_from_mmatrix.lua')
-rw-r--r-- | examples/cumatrix_from_mmatrix.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/cumatrix_from_mmatrix.lua b/examples/cumatrix_from_mmatrix.lua index fba8a90..964d008 100644 --- a/examples/cumatrix_from_mmatrix.lua +++ b/examples/cumatrix_from_mmatrix.lua @@ -19,5 +19,9 @@ fc:copy_from(fm) dc:copy_from(dm) print(fc) print(dc) -print(fc:softmax()) -print(dc:softmax()) +sfc = fc:create() +sdc = dc:create() +sfc:softmax(fc) +print(sfc) +sdc:softmax(dc) +print(sdc) |