diff options
author | Ronan Collobert <ronan@collobert.com> | 2012-02-03 14:09:42 +0400 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2012-02-03 14:09:42 +0400 |
commit | bd7d37fb80852bdeb7b518aa7b87afeb1e6d724b (patch) | |
tree | 1cc7900f699dbe2ea94aa1a90adfb93dfbb037f0 /generic | |
parent | 5a180a34b73b483ecf66ec88d42c2c371de7520c (diff) |
Merge branch 'master' into newpack
Diffstat (limited to 'generic')
-rw-r--r-- | generic/Sqrt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/Sqrt.c b/generic/Sqrt.c index a739e96..64bdc7c 100644 --- a/generic/Sqrt.c +++ b/generic/Sqrt.c @@ -5,12 +5,13 @@ static int nn_(Sqrt_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id)); + real bias = luaT_getfieldchecknumber(L,1,"bias"); THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_(Tensor_id)); THTensor_(resizeAs)(output, input); TH_TENSOR_APPLY2(real, output, real, input, \ - *output_data = sqrt(*input_data);); + *output_data = sqrt(*input_data + bias);); return 1; } |