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:
authorSergey Zagoruyko <zagoruyko2@gmail.com>2015-05-30 22:55:08 +0300
committerSergey Zagoruyko <zagoruyko2@gmail.com>2015-05-30 22:55:08 +0300
commit12b2af1fc2758bbc1a33ba20b0bedb45e2e5f8d8 (patch)
tree410f41b226c930589f13f764e2f0d9c71c502647 /SpatialConvolution.lua
parent744d78391a1086f9e23be152e405e58554ebf388 (diff)
less cluttering tostring
Diffstat (limited to 'SpatialConvolution.lua')
-rw-r--r--SpatialConvolution.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/SpatialConvolution.lua b/SpatialConvolution.lua
index c5fce40..3507030 100644
--- a/SpatialConvolution.lua
+++ b/SpatialConvolution.lua
@@ -121,13 +121,15 @@ function SpatialConvolution:type(type)
end
function SpatialConvolution:__tostring__()
- local s = string.format('%s(in: %d, out: %d, kW: %d, kH: %d', torch.type(self),
+ local s = string.format('%s(%d -> %d, %dx%d', torch.type(self),
self.nInputPlane, self.nOutputPlane, self.kW, self.kH)
if self.dW ~= 1 or self.dH ~= 1 then
- s = s .. string.format(', dW: %d, dH: %d', self.dW, self.dH)
+ s = s .. string.format(', %d,%d', self.dW, self.dH)
end
- if self.padding ~= 0 then
- s = s .. ', padding: ' .. self.padding
+ if self.padding and self.padding ~= 0 then
+ s = s .. ', ' .. self.padding .. ',' .. self.padding
+ elseif self.pad_w or self.pad_h then
+ s = s .. ', ' .. self.pad_w .. ',' .. self.pad_h
end
return s .. ')'
end