Skip to content

Commit

Permalink
Merge pull request #536 from LuxDL/auto-juliaformatter-pr
Browse files Browse the repository at this point in the history
Automatic JuliaFormatter.jl run
  • Loading branch information
avik-pal authored Mar 5, 2024
2 parents 111e38c + 7381bd5 commit 8dd9bc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions examples/PolynomialFitting/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ with_theme(theme_web()) do
ax = CairoMakie.Axis(fig[1, 1]; xlabel="x", ylabel="y")

l = lines!(ax, x[1, :], x -> evalpoly(x, (0, -2, 1)); linewidth=3)
s = scatter!(ax, x[1, :], y[1, :]; markersize=8, color=:orange,
strokecolor=:black, strokewidth=1)
s = scatter!(ax, x[1, :], y[1, :]; markersize=8,
color=:orange, strokecolor=:black, strokewidth=1)

axislegend(ax, [l, s], ["True Quadratic Function", "Data Points"])

Expand Down Expand Up @@ -103,8 +103,8 @@ with_theme(theme_web()) do
ax = CairoMakie.Axis(fig[1, 1]; xlabel="x", ylabel="y")

l = lines!(ax, x[1, :], x -> evalpoly(x, (0, -2, 1)); linewidth=3)
s1 = scatter!(ax, x[1, :], y[1, :]; markersize=8, color=:orange,
strokecolor=:black, strokewidth=1)
s1 = scatter!(ax, x[1, :], y[1, :]; markersize=8,
color=:orange, strokecolor=:black, strokewidth=1)
s2 = scatter!(ax, x[1, :], y_pred[1, :]; markersize=8,
color=:green, strokecolor=:black, strokewidth=1)

Expand Down
4 changes: 2 additions & 2 deletions ext/LuxFluxExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ function __from_flux_adaptor(l::Flux.ConvTranspose; preserve_ps_st::Bool=false,
if preserve_ps_st
_bias = l.bias isa Bool ? nothing :
reshape(copy(l.bias), ntuple(_ -> 1, length(k))..., out_chs, 1)
return ConvTranspose(k, in_chs * groups => out_chs, l.σ; l.stride, pad,
l.dilation, groups, use_bias=!(l.bias isa Bool),
return ConvTranspose(k, in_chs * groups => out_chs, l.σ; l.stride,
pad, l.dilation, groups, use_bias=!(l.bias isa Bool),
init_weight=__copy_anonymous_closure(Lux._maybe_flip_conv_weight(l.weight)),
init_bias=__copy_anonymous_closure(_bias))
else
Expand Down

0 comments on commit 8dd9bc2

Please sign in to comment.