Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nngraph.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Danihelka <danihelka@google.com>2015-03-27 20:30:10 +0300
committerIvo Danihelka <danihelka@google.com>2015-03-27 20:30:10 +0300
commit5eaa5f038180e389e337624db0834d43c5b11484 (patch)
tree208bf6a6dcd410a6cb31ac3833c5924b726bd6c6
parent78c3649f7903454aa9043dcb8d639537c6d5f604 (diff)
Added __tostring__ to gModule.
-rw-r--r--gmodule.lua5
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
+