Skip to content

Commit 2034a67

Browse files
committed
update
1 parent 561ae53 commit 2034a67

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/mar.jl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ The following example is taken from [`examples/asia-network/main.jl`](https://te
145145
```jldoctest; setup = :(using TensorInference, Random; Random.seed!(0))
146146
julia> model = read_model_file(pkgdir(TensorInference, "examples", "asia-network", "model.uai"));
147147
148-
julia> tn = TensorNetworkModel(model; evidence=Dict(1=>0))
149-
TensorNetworkModel{Int64, DynamicNestedEinsum{Int64}, Array{Float64}}
150-
variables: 1 (evidence → 0), 2, 3, 4, 5, 6, 7, 8
151-
contraction time = 2^6.022, space = 2^2.0, read-write = 2^7.077
148+
julia> tn = TensorNetworkModel(model; evidence=Dict(1=>0));
152149
153150
julia> marginals(tn)
154151
Dict{Vector{Int64}, Vector{Float64}} with 8 entries:
@@ -161,10 +158,7 @@ Dict{Vector{Int64}, Vector{Float64}} with 8 entries:
161158
[7] => [0.145092, 0.854908]
162159
[2] => [0.05, 0.95]
163160
164-
julia> tn2 = TensorNetworkModel(model; evidence=Dict(1=>0), mars=[[2, 3], [3, 4]])
165-
TensorNetworkModel{Int64, DynamicNestedEinsum{Int64}, Array{Float64}}
166-
variables: 1 (evidence → 0), 2, 3, 4, 5, 6, 7, 8
167-
contraction time = 2^7.781, space = 2^5.0, read-write = 2^8.443
161+
julia> tn2 = TensorNetworkModel(model; evidence=Dict(1=>0), mars=[[2, 3], [3, 4]]);
168162
169163
julia> marginals(tn2)
170164
Dict{Vector{Int64}, Matrix{Float64}} with 2 entries:

0 commit comments

Comments
 (0)