diff options
Diffstat (limited to 'nerv/nn/layer_repo.lua')
-rw-r--r-- | nerv/nn/layer_repo.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nerv/nn/layer_repo.lua b/nerv/nn/layer_repo.lua index 2f8de08..3d3a79f 100644 --- a/nerv/nn/layer_repo.lua +++ b/nerv/nn/layer_repo.lua @@ -9,6 +9,9 @@ function LayerRepo:add_layers(layer_spec, param_repo, global_conf) local layers = self.layers for ltype, llist in pairs(layer_spec) do local layer_type = nerv.get_type(ltype) + if layer_type == nil then + nerv.error('layer type `%s` not found', ltype) + end for id, spec in pairs(llist) do if layers[id] ~= nil then nerv.error("a layer with id %s already exists", id) |