Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'generic/HardShrink.c')
-rw-r--r--generic/HardShrink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/HardShrink.c b/generic/HardShrink.c
index be98ddc..6760036 100644
--- a/generic/HardShrink.c
+++ b/generic/HardShrink.c
@@ -4,9 +4,9 @@
static int nn_(HardShrink_updateOutput)(lua_State *L)
{
- THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id));
+ THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
real lambda = luaT_getfieldchecknumber(L, 1, "lambda");
- THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_(Tensor_id));
+ THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor);
THTensor_(resizeAs)(output, input);
@@ -19,10 +19,10 @@ static int nn_(HardShrink_updateOutput)(lua_State *L)
static int nn_(HardShrink_updateGradInput)(lua_State *L)
{
- THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id));
+ THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
real lambda = luaT_getfieldchecknumber(L, 1, "lambda");
- THTensor *gradOutput = luaT_checkudata(L, 3, torch_(Tensor_id));
- THTensor *gradInput = luaT_getfieldcheckudata(L, 1, "gradInput", torch_(Tensor_id));
+ THTensor *gradOutput = luaT_checkudata(L, 3, torch_Tensor);
+ THTensor *gradInput = luaT_getfieldcheckudata(L, 1, "gradInput", torch_Tensor);
THTensor_(resizeAs)(gradInput, input);
TH_TENSOR_APPLY3(real, gradInput, real, gradOutput, real, input, \
@@ -42,7 +42,7 @@ static const struct luaL_Reg nn_(HardShrink__) [] = {
static void nn_(HardShrink_init)(lua_State *L)
{
- luaT_pushmetaclass(L, torch_(Tensor_id));
+ luaT_pushmetatable(L, torch_Tensor);
luaT_registeratname(L, nn_(HardShrink__), "nn");
lua_pop(L,1);
}