diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cumatrix_example.lua | 6 | ||||
-rw-r--r-- | examples/cumatrix_from_mmatrix.lua | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/examples/cumatrix_example.lua b/examples/cumatrix_example.lua index f8235eb..084dcca 100644 --- a/examples/cumatrix_example.lua +++ b/examples/cumatrix_example.lua @@ -11,10 +11,12 @@ for i = 0, m - 1 do end end print(fm) -fs = fm:softmax() +fs = fm:create() +fs:softmax(fm) -- print(fs) print(dm) -ds = dm:softmax() +ds = dm:create() +ds:softmax(dm) -- print(ds) print(fs) print(fs + fs) 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) |