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:
authorJonathan J Hunt <jjhunt@google.com>2015-01-08 17:51:37 +0300
committerJonathan J Hunt <jjhunt@google.com>2015-01-08 20:08:21 +0300
commit608ac7c2bbf52677a38c6f2d7e45b8817e4ba3af (patch)
tree4cf6b285e8daa62bd1cb68ce684e0d5d4d6ec377 /Reshape.lua
parent27acf6315e30181936a309e9831e18baec1a3f28 (diff)
Added more informative pretty-printing.
Diffstat (limited to 'Reshape.lua')
-rw-r--r--Reshape.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/Reshape.lua b/Reshape.lua
index 0baab17..dcc787b 100644
--- a/Reshape.lua
+++ b/Reshape.lua
@@ -61,3 +61,9 @@ function Reshape:updateGradInput(input, gradOutput)
self.gradInput:viewAs(gradOutput, input)
return self.gradInput
end
+
+
+function Reshape:__tostring__()
+ return torch.type(self) .. '(' ..
+ table.concat(self.size:totable(), 'x') .. ')'
+end