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:
Diffstat (limited to 'SpatialFullConvolution.lua')
-rw-r--r--SpatialFullConvolution.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/SpatialFullConvolution.lua b/SpatialFullConvolution.lua
index e6019bc..d28579b 100644
--- a/SpatialFullConvolution.lua
+++ b/SpatialFullConvolution.lua
@@ -72,7 +72,7 @@ function SpatialFullConvolution:updateOutput(input)
-- The input can be a table where the second element indicates the target
-- output size, in which case the adj factors are computed automatically
- if type(inputTensor) == 'table' then
+ if torch.type(inputTensor) == 'table' then
inputTensor = input[1]
local targetTensor = input[2]
local tDims = targetTensor:dim()
@@ -113,7 +113,7 @@ function SpatialFullConvolution:updateGradInput(input, gradOutput)
-- The input can be a table where the second element indicates the target
-- output size, in which case the adj factors are computed automatically
- if type(inputTensor) == 'table' then
+ if torch.type(inputTensor) == 'table' then
inputTensor = input[1]
local targetTensor = input[2]
local tDims = targetTensor:dim()
@@ -122,7 +122,7 @@ function SpatialFullConvolution:updateGradInput(input, gradOutput)
adjW = calculateAdj(tW, self.kW, self.padW, self.dW)
adjH = calculateAdj(tH, self.kH, self.padH, self.dH)
-- Momentarily extract the gradInput tensor
- if type(self.gradInput) == 'table' then
+ if torch.type(self.gradInput) == 'table' then
self.gradInput = self.gradInput[1] or inputTensor.new()
end
end
@@ -139,7 +139,7 @@ function SpatialFullConvolution:updateGradInput(input, gradOutput)
adjW, adjH
)
- if type(input) == 'table' then
+ if torch.type(input) == 'table' then
-- Create a zero tensor to be expanded and used as gradInput[2].
self.zeroScalar = self.zeroScalar or input[2].new(1):zero()
self.ones:resize(input[2]:dim()):fill(1)
@@ -162,7 +162,7 @@ function SpatialFullConvolution:accGradParameters(input, gradOutput, scale)
-- The input can be a table where the second element indicates the target
-- output size, in which case the adj factors are computed automatically
- if type(inputTensor) == 'table' then
+ if torch.type(inputTensor) == 'table' then
inputTensor = input[1]
local targetTensor = input[2]
local tDims = targetTensor:dim()