Skip to content

Commit

Permalink
Adjusted to new interface such that script runs through.
Browse files Browse the repository at this point in the history
  • Loading branch information
benedict-96 committed Apr 8, 2024
1 parent 2ace139 commit 35539e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/tutorials/grassmann_layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ε = 0.1 # entropic regularization. √ε is a length. #
const q = 1.0 # annealing parameter # hide
const Δ = 1.0 # characteristic domain size # hide
const s = ε # current scale: no annealing -> equals ε # hide
const tol = 1e-4 # marginal condition tolerance # hide
const tol = 1e-6 # marginal condition tolerance # hide
const crit_it = 20 # acceleration inference # hide
const p_η = 2
Expand All @@ -58,7 +58,7 @@ function compute_wasserstein_gradient(ensemble1::AT, ensemble2::AT) where AT<:Ab
V = SinkhornVariable(copy(ensemble1'), ones(number_of_particles1) / number_of_particles1)
W = SinkhornVariable(copy(ensemble2'), ones(number_of_particles2) / number_of_particles2)
params = SinkhornParameters(; ε=ε,q=1.0,Δ=1.0,s=s,tol=tol,crit_it=crit_it,p_η=p_η,sym=false,acc=true) # hide
S = SinkhornDivergence(V, W, c, params, true)
S = SinkhornDivergence(V, W, c, params; islog = true)
initialize_potentials!(S)
compute!(S)
value(S), x_gradient!(S, ∇c)'
Expand Down

0 comments on commit 35539e0

Please sign in to comment.