diff options
author | Nicholas Leonard <nleonard@twitter.com> | 2017-05-24 21:47:37 +0300 |
---|---|---|
committer | Nicholas Leonard <nleonard@twitter.com> | 2017-05-24 22:08:29 +0300 |
commit | c292da3372a8514ec8b679095dd1d3e428d539fe (patch) | |
tree | 1adfa23d669b6c17658f5b28706f658c20e47ee2 /OneHot.lua | |
parent | 328351690a67b9eac5561380c5ce76c039de54c6 (diff) | |
parent | aaf120aaecd4e9b8870a5562aa95426c33022ce2 (diff) |
Merge branch 'master' of github.com:torch/nn into OneHot
Diffstat (limited to 'OneHot.lua')
-rw-r--r-- | OneHot.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |