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-07-11 00:20:30 +0300
committerNicholas Leonard <nleonard@twitter.com>2017-07-11 00:53:40 +0300
commit0aeb67b544e7b385647b17342fd2eccf3cb9a0e2 (patch)
treea437032e313e31ab69b630cb7dc828b3b2ce3b65 /IndexLinear.lua
parent4bd94cb76086290d2391e68be0d3c04409a0b598 (diff)
parameters() uses torch.type instead of type
Diffstat (limited to 'IndexLinear.lua')
-rw-r--r--IndexLinear.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/IndexLinear.lua b/IndexLinear.lua
index 2ddbcbd..6b6b200 100644
--- a/IndexLinear.lua
+++ b/IndexLinear.lua
@@ -73,7 +73,7 @@ function IndexLinear:reset(stdv)
end
function IndexLinear:reshapeInput(input)
- assert(type(input) == 'table')
+ assert(torch.type(input) == 'table')
local ninputs = 0
for _, v in ipairs(input) do
@@ -108,7 +108,7 @@ function IndexLinear:reshapeInput(input)
-- { torch.LongTensor(size1), torch.LongTensor(size2), ..., torch.LongTensor(sizeN) }, -- batch of keys
-- { torch.Tensor(size1), torch.Tensor(size2), ..., torch.Tensor(sizeN) }, -- batch of values,
-- }
- if type(keys) == 'table' and type(values) == 'table' then
+ if torch.type(keys) == 'table' and torch.type(values) == 'table' then
lkeys, lvalues = keys, values
self.isFlat = false
self.noBatch = false