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:
authorNicholas Leonard <nleonard@twitter.com>2017-05-24 21:47:37 +0300
committerNicholas Leonard <nleonard@twitter.com>2017-05-24 22:08:29 +0300
commitc292da3372a8514ec8b679095dd1d3e428d539fe (patch)
tree1adfa23d669b6c17658f5b28706f658c20e47ee2 /OneHot.lua
parent328351690a67b9eac5561380c5ce76c039de54c6 (diff)
parentaaf120aaecd4e9b8870a5562aa95426c33022ce2 (diff)
Merge branch 'master' of github.com:torch/nn into OneHot
Diffstat (limited to 'OneHot.lua')
-rw-r--r--OneHot.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/OneHot.lua b/OneHot.lua
index f1f725b..d1dc1b5 100644
--- a/OneHot.lua
+++ b/OneHot.lua
@@ -24,10 +24,10 @@ function OneHot:updateOutput(input)
end
table.insert(size, self.outputSize)
- self.output:resize(unpack(size)):zero()
+ self.output:resize(table.unpack(size)):zero()
size[#size] = 1
- local input_ = input:view(unpack(size))
+ local input_ = input:view(table.unpack(size))
if torch.type(input) == 'torch.CudaTensor' or torch.type(input) == 'torch.ClTensor' then
self.output:scatter(self.output:dim(), input_, 1)