diff options
Diffstat (limited to 'matrix/init.lua')
-rw-r--r-- | matrix/init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/matrix/init.lua b/matrix/init.lua index c33cf7e..8f626dc 100644 --- a/matrix/init.lua +++ b/matrix/init.lua @@ -32,3 +32,9 @@ function nerv.CuMatrix:__sub__(b) c:add(self, b, 1.0, -1.0) return c end + +function nerv.CuMatrix:__mul__(b) + c = self:create() + c:mul(self, b, 'N', 'N') + return c +end |