We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c169d9 commit 79da5c9Copy full SHA for 79da5c9
src/networks.jl
@@ -2,8 +2,8 @@ function generate_tensors(x::T, m::ConstraintSatisfactionProblem) where T
2
cons = ProblemReductions.constraints(m)
3
objs = ProblemReductions.objectives(m)
4
tensors = vcat(
5
- [reshape(map(s -> s ? one(x) : zero(x), t.specification), ntuple(i->num_flavors(m), length(t.variables))) for t in cons],
6
- [reshape(map(s -> _pow(x, s.size), t.specification), ntuple(i->num_flavors(m), length(t.variables))) for t in objs]
+ Array{T}[reshape(map(s -> s ? one(x) : zero(x), t.specification), ntuple(i->num_flavors(m), length(t.variables))) for t in cons],
+ Array{T}[reshape(map(s -> _pow(x, s), t.specification), ntuple(i->num_flavors(m), length(t.variables))) for t in objs]
7
)
8
ixs = vcat([t.variables for t in cons], [t.variables for t in objs])
9
return add_labels!(tensors, ixs, variables(m))
0 commit comments