Skip to content

Fixes for learning ICNs with CBLS #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/icn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
7 changes: 6 additions & 1 deletion src/layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading