@@ -145,10 +145,7 @@ The following example is taken from [`examples/asia-network/main.jl`](https://te
145
145
```jldoctest; setup = :(using TensorInference, Random; Random.seed!(0))
146
146
julia> model = read_model_file(pkgdir(TensorInference, "examples", "asia-network", "model.uai"));
147
147
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));
152
149
153
150
julia> marginals(tn)
154
151
Dict{Vector{Int64}, Vector{Float64}} with 8 entries:
@@ -161,10 +158,7 @@ Dict{Vector{Int64}, Vector{Float64}} with 8 entries:
161
158
[7] => [0.145092, 0.854908]
162
159
[2] => [0.05, 0.95]
163
160
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]]);
168
162
169
163
julia> marginals(tn2)
170
164
Dict{Vector{Int64}, Matrix{Float64}} with 2 entries:
0 commit comments