diff options
author | Qi Liu <liuq901@163.com> | 2016-03-01 20:00:53 +0800 |
---|---|---|
committer | Qi Liu <liuq901@163.com> | 2016-03-01 20:00:53 +0800 |
commit | 2ea3e139af91eb894d904d7a956e28619b1a70f6 (patch) | |
tree | 249bb3ace8004f8d79d0e41ee97587fcc015d3de /nerv/layer/graph.lua | |
parent | 1a424bf9233f9b1c67ef135f1a3892b7986c5564 (diff) |
network init complete
Diffstat (limited to 'nerv/layer/graph.lua')
-rw-r--r-- | nerv/layer/graph.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nerv/layer/graph.lua b/nerv/layer/graph.lua index 36a9672..d72d849 100644 --- a/nerv/layer/graph.lua +++ b/nerv/layer/graph.lua @@ -64,6 +64,9 @@ function GraphLayer:graph_init(layer_repo, connections) local id_to, port_to = parse_id(to) local ref_from = self:discover(id_from, layer_repo) local ref_to = self:discover(id_to, layer_repo) + if ref_from.outputs[port_from] ~= nil then + nerv.error('%s has already been attached', from) + end if ref_to.inputs[port_to] ~= nil then nerv.error('%s has already been attached', to) end |