Skip to content

Commit

Permalink
Merge branch 'minibatch' of https://github.com/YichengDWu/Sophon.jl i…
Browse files Browse the repository at this point in the history
…nto minibatch
  • Loading branch information
YichengDWu committed Oct 21, 2022
2 parents 31b4317 + a1dc0c0 commit 0bbd77a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/src/tutorials/burgers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ end

function Sophon.sample(sampler::MyFuncSampler)
(; n, grf, pts) = sampler
xs = ys = [
cubic_spline_interpolation(pts, pts .* (1 .- pts) .* sample(grf) .+ 0.1 * randn()),
]
for _ in 1:(n - 1)
y = cubic_spline_interpolation(pts,
pts .* (1 .- pts) .* sample(grf) .+ 0.1 * randn())
ys = [cubic_spline_interpolation(pts, pts .* (1 .- pts) .* sample(grf) .+ 0.1*randn())]
for _ in 1:n-1
y = cubic_spline_interpolation(pts, pts .* (1 .- pts) .* sample(grf) .+ 0.1*randn())
push!(ys, y)
end
return ys
Expand Down

0 comments on commit 0bbd77a

Please sign in to comment.