diff options
author | Jonathan J Hunt <jjhunt@google.com> | 2015-01-08 17:51:37 +0300 |
---|---|---|
committer | Jonathan J Hunt <jjhunt@google.com> | 2015-01-08 20:08:21 +0300 |
commit | 608ac7c2bbf52677a38c6f2d7e45b8817e4ba3af (patch) | |
tree | 4cf6b285e8daa62bd1cb68ce684e0d5d4d6ec377 /Reshape.lua | |
parent | 27acf6315e30181936a309e9831e18baec1a3f28 (diff) |
Added more informative pretty-printing.
Diffstat (limited to 'Reshape.lua')
-rw-r--r-- | Reshape.lua | 6 |
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 |