aboutsummaryrefslogtreecommitdiff
path: root/cumatrix_example.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-19 15:21:52 +0800
committerDeterminant <[email protected]>2015-05-19 15:21:52 +0800
commit32e5174ac5a57307d9e46bb1e02d3031a5afea4e (patch)
tree5d93bfb816ef9351bbe893bfb8703194b9751a55 /cumatrix_example.lua
parent0e738af4bb1eda301564d8469178a7581b0cbcce (diff)
add subtraction for cumatrix
Diffstat (limited to 'cumatrix_example.lua')
-rw-r--r--cumatrix_example.lua8
1 files changed, 6 insertions, 2 deletions
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)