diff --git a/src/icn.jl b/src/icn.jl index a0047eb..2c21632 100644 --- a/src/icn.jl +++ b/src/icn.jl @@ -133,6 +133,7 @@ function _compose(icn::ICN) if exclu(layer) f_id = as_int(@view weights(icn)[_start:_end]) + # @warn "debug" f_id _end _start weights(icn) (exclu(layer) ? "nbits_exclu(layer)" : "length(layer)") (@view weights(icn)[_start:_end]) s = symbol(layer, f_id + 1) push!(funcs, [functions(layer)[s]]) push!(symbols, [s]) diff --git a/src/layer.jl b/src/layer.jl index 53646f0..18be36f 100644 --- a/src/layer.jl +++ b/src/layer.jl @@ -30,7 +30,12 @@ exclu(layer) = layer.exclusive symbol(layer, i) Return the i-th symbols of the operations in a given layer. """ -symbol(layer, i) = collect(keys(functions(layer)))[i] +symbol(layer, i) = begin + if i > length(layer) + @info layer i functions(layer) + end + collect(keys(functions(layer)))[i] +end """ nbits_exclu(layer)