Skip to content

Commit

Permalink
docs: make all eltypes Float32 in Fitting a Polynomial using MLP (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleort authored Jul 12, 2024
1 parent 2283abf commit af196ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/PolynomialFitting/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using CairoMakie
# Generate 128 datapoints from the polynomial $y = x^2 - 2x$.
function generate_data(rng::AbstractRNG)
x = reshape(collect(range(-2.0f0, 2.0f0, 128)), (1, 128))
y = evalpoly.(x, ((0, -2, 1),)) .+ randn(rng, (1, 128)) .* 0.1f0
y = evalpoly.(x, ((0, -2, 1),)) .+ randn(rng, Float32, (1, 128)) .* 0.1f0
return (x, y)
end

Expand Down

0 comments on commit af196ba

Please sign in to comment.