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--graphinspecting.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphinspecting.lua b/graphinspecting.lua
index 66a334f..7c8d462 100644
--- a/graphinspecting.lua
+++ b/graphinspecting.lua
@@ -83,6 +83,9 @@ local function onError(failedNode, gmodule)
local nInputs = gmodule.nInputs or #gmodule.innode.children
local svgPathPrefix = gmodule.name or string.format(
'nngraph_%sin_%sout', nInputs, #gmodule.outnode.children)
+ if paths.filep(svgPathPrefix .. '.svg') then
+ svgPathPrefix = svgPathPrefix .. '_' .. paths.basename(os.tmpname())
+ end
local dotStr = customToDot(gmodule.fg, svgPathPrefix, failedNode)
saveSvg(svgPathPrefix, dotStr)
end