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:
authorAndreas Köpf <andreas.koepf@xamla.com>2016-01-02 17:05:07 +0300
committerAndreas Köpf <andreas.koepf@xamla.com>2016-01-02 17:05:07 +0300
commit75ef32047a34c0e41f917c44bbc24a6b46cbd8ba (patch)
tree3c4b7e0f3290b97dbe6b45e1275a5a1bd0670c87 /THNN.lua
parentba1cbdeae974dbc5a8396cebeec3a93f0e6424dc (diff)
Add functional conversion of HardTanh
Diffstat (limited to 'THNN.lua')
-rw-r--r--THNN.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/THNN.lua b/THNN.lua
index 235b58c..dcae9d2 100644
--- a/THNN.lua
+++ b/THNN.lua
@@ -67,6 +67,20 @@ TH_API void THNN_(HardShrink_updateGradInput)(
THTensor *gradOutput,
THTensor *gradInput,
real lambda);
+
+TH_API void THNN_(HardTanh_updateOutput)(
+ THNNState *state,
+ THTensor *input,
+ THTensor *output,
+ real min_val,
+ real max_val);
+TH_API void THNN_(HardTanh_updateGradInput)(
+ THNNState *state,
+ THTensor *input,
+ THTensor *gradOutput,
+ THTensor *gradInput,
+ real min_val,
+ real max_val);
]]
-- THGenerator struct declaration copied from torch7/lib/TH/THRandom.h