From 32e5174ac5a57307d9e46bb1e02d3031a5afea4e Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 19 May 2015 15:21:52 +0800 Subject: add subtraction for cumatrix --- cumatrix_example.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cumatrix_example.lua') diff --git a/cumatrix_example.lua b/cumatrix_example.lua index f26d7f4..aeb5828 100644 --- a/cumatrix_example.lua +++ b/cumatrix_example.lua @@ -11,6 +11,10 @@ for i = 0, m - 1 do end end print(fm) -print(fm:softmax()) +fs = fm:softmax() +print(fs) print(dm) -print(dm:softmax()) +ds = dm:softmax() +print(ds) +print(fs + fs) +print(fs - fs) -- cgit v1.2.3-70-g09d2