diff options
Diffstat (limited to 'generic/SoftMax.c')
-rw-r--r-- | generic/SoftMax.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/SoftMax.c b/generic/SoftMax.c index 3aaae65..fd73b3e 100644 --- a/generic/SoftMax.c +++ b/generic/SoftMax.c @@ -4,8 +4,8 @@ static int nn_(SoftMax_updateOutput)(lua_State *L) { - THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id)); - THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_(Tensor_id)); + THTensor *input = luaT_checkudata(L, 2, torch_Tensor); + THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor); real *input_data, *output_data; long nframe = 0, dim = 0; long t, d; @@ -57,9 +57,9 @@ static int nn_(SoftMax_updateOutput)(lua_State *L) static int nn_(SoftMax_updateGradInput)(lua_State *L) { - THTensor *gradOutput = luaT_checkudata(L, 3, torch_(Tensor_id)); - THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_(Tensor_id)); - THTensor *gradInput = luaT_getfieldcheckudata(L, 1, "gradInput", torch_(Tensor_id)); + THTensor *gradOutput = luaT_checkudata(L, 3, torch_Tensor); + THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor); + THTensor *gradInput = luaT_getfieldcheckudata(L, 1, "gradInput", torch_Tensor); real *gradInput_data, *gradOutput_data, *output_data; long nframe = 0, dim = 0; long t, d; @@ -106,7 +106,7 @@ static const struct luaL_Reg nn_(SoftMax__) [] = { static void nn_(SoftMax_init)(lua_State *L) { - luaT_pushmetaclass(L, torch_(Tensor_id)); + luaT_pushmetatable(L, torch_Tensor); luaT_registeratname(L, nn_(SoftMax__), "nn"); lua_pop(L,1); } |