diff options
author | Ivo Danihelka <danihelka@google.com> | 2015-12-18 19:56:04 +0300 |
---|---|---|
committer | Ivo Danihelka <danihelka@google.com> | 2015-12-18 19:56:04 +0300 |
commit | f290385da6c6e553b9c5d6966fe454e5b45a88ff (patch) | |
tree | 7facc0cc09a782d378dfe5357c9a502cbb4b2380 /node.lua | |
parent | a4cc6c9fbad6fb322fcd69937d67c5183f6fcc37 (diff) |
Allow to do node:split(1).
Diffstat (limited to 'node.lua')
-rw-r--r-- | node.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -46,7 +46,9 @@ end -- that each take a single component of the output of this -- node in the order they are returned. function nnNode:split(noutput) - assert(noutput >= 2, "splitting to one output is not supported") + if noutput == 1 then + return nngraph.JustElement()(self) + end local debugLabel = self.data.annotations._debugLabel -- Specify the source location where :split is called. local dinfo = debug.getinfo(2, 'Sl') |