aboutsummaryrefslogtreecommitdiff
path: root/nerv/matrix/generic/cumatrix.c
diff options
context:
space:
mode:
authortxh18 <cloudygooseg@gmail.com>2015-12-02 15:23:54 +0800
committertxh18 <cloudygooseg@gmail.com>2015-12-02 15:23:54 +0800
commit41a841f3e0992a578cf5c8f82ae44a552a6f8b2f (patch)
tree0a5ba8d1530290fd91febcfe69986c96be0ac895 /nerv/matrix/generic/cumatrix.c
parent0c286aa6237da9e8daa7db8ed1e3805a33312926 (diff)
changed thres_mask function of matrix to a more standard api
Diffstat (limited to 'nerv/matrix/generic/cumatrix.c')
-rw-r--r--nerv/matrix/generic/cumatrix.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nerv/matrix/generic/cumatrix.c b/nerv/matrix/generic/cumatrix.c
index d1f763b..fb36033 100644
--- a/nerv/matrix/generic/cumatrix.c
+++ b/nerv/matrix/generic/cumatrix.c
@@ -65,10 +65,11 @@ static int nerv_matrix_(lua_sigmoid_grad)(lua_State *L) {
static int nerv_matrix_(lua_thres_mask)(lua_State *L) {
Status status;
Matrix *a = luaT_checkudata(L, 1, nerv_matrix_(tname));
- MATRIX_ELEM thres = luaL_checknumber(L, 2);
- MATRIX_ELEM low = luaL_checknumber(L, 3);
- MATRIX_ELEM high = luaL_checknumber(L, 4);
- nerv_matrix_(thres_mask)(a, thres, low, high, &status);
+ Matrix *b = luaT_checkudata(L, 2, nerv_matrix_(tname));
+ MATRIX_ELEM thres = luaL_checknumber(L, 3);
+ MATRIX_ELEM low = luaL_checknumber(L, 4);
+ MATRIX_ELEM high = luaL_checknumber(L, 5);
+ nerv_matrix_(thres_mask)(a, b, thres, low, high, &status);
NERV_LUA_CHECK_STATUS(L, status);
return 0;
}