diff options
author | Ivo Danihelka <danihelka@google.com> | 2015-03-27 20:30:10 +0300 |
---|---|---|
committer | Ivo Danihelka <danihelka@google.com> | 2015-03-27 20:30:10 +0300 |
commit | 5eaa5f038180e389e337624db0834d43c5b11484 (patch) | |
tree | 208bf6a6dcd410a6cb31ac3833c5924b726bd6c6 | |
parent | 78c3649f7903454aa9043dcb8d639537c6d5f604 (diff) |
Added __tostring__ to gModule.
-rw-r--r-- | gmodule.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gmodule.lua b/gmodule.lua index 0f0f461..8dc100d 100644 --- a/gmodule.lua +++ b/gmodule.lua @@ -352,3 +352,8 @@ function gModule:parameters() end return p,gp end + +function gModule:__tostring__() + return self.name or torch.type(self) +end + |