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:
-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
+