Skip to content

Commit

Permalink
Fixes for learning ICN with CBLS (#19)
Browse files Browse the repository at this point in the history
* Compat, CI, and Parallelism: release (#18)

* Cleaning and CI updates (#13)

* Cleaning and CI updates

* Fix CI for Julia 1.8

* Compat ci (#17)

* Cleaning and CI updates (#13) (#14)

* Cleaning and CI updates

* Fix CI for Julia 1.8

* Compat and CI

* Fixes for learning ICN aith CBLS
  • Loading branch information
Azzaare authored Aug 12, 2024
1 parent 6e29a1a commit 2779495
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/icn/cbls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ function CompositionalNetworks.optimize!(
@debug "pool" s.pool best_values(s.pool) best_values(s) s.pool.configurations

# Return best values
best = BitVector(collect(best_values(s)))
weights!(icn, best)

if has_solution(s)
weights!(icn, BitVector(collect(best_values(s))))
else
CompositionalNetworks.generate_weights(icn)
end
best = weights(icn)

return best, Dictionary{BitVector, Int}([best], [1])
end
Expand Down

0 comments on commit 2779495

Please sign in to comment.