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-05 18:23:34 +0300
committerAndreas Köpf <andreas.koepf@xamla.com>2016-01-05 18:23:34 +0300
commit690aea1dcdd56f01e5da052f8d5d6447d912d643 (patch)
tree83900a690386a7a91e129d3ee59b6ccac2cf5e5c /LogSigmoid.lua
parent4dc0df7d35c5ab32c55d28f1137708d8af9eadfd (diff)
Add THNN conversion of {ELU, LeakyReLU, LogSigmoid, LogSoftMax, LookupTable}
Diffstat (limited to 'LogSigmoid.lua')
-rw-r--r--LogSigmoid.lua15
1 files changed, 13 insertions, 2 deletions
diff --git a/LogSigmoid.lua b/LogSigmoid.lua
index 7485ae6..b2b773a 100644
--- a/LogSigmoid.lua
+++ b/LogSigmoid.lua
@@ -6,9 +6,20 @@ function LogSigmoid:__init()
end
function LogSigmoid:updateOutput(input)
- return input.nn.LogSigmoid_updateOutput(self, input)
+ input.THNN.LogSigmoid_updateOutput(
+ input:cdata(),
+ self.output:cdata(),
+ self.buffer:cdata()
+ )
+ return self.output
end
function LogSigmoid:updateGradInput(input, gradOutput)
- return input.nn.LogSigmoid_updateGradInput(self, input, gradOutput)
+ input.THNN.LogSigmoid_updateGradInput(
+ input:cdata(),
+ gradOutput:cdata(),
+ self.gradInput:cdata(),
+ self.buffer:cdata()
+ )
+ return self.gradInput
end