From 09760cab58f228ed4673302e5763aea40d6b7a31 Mon Sep 17 00:00:00 2001 From: Sikorski Date: Thu, 27 Jun 2024 16:15:10 +0200 Subject: [PATCH] fix scatter binding --- src/bonito.jl | 8 ++++---- src/makie.jl | 2 +- src/models.jl | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bonito.jl b/src/bonito.jl index 1147611..4a7d521 100644 --- a/src/bonito.jl +++ b/src/bonito.jl @@ -13,7 +13,7 @@ function content(session) isoui, isoo = @time isocreator() global ISO ISO = isoo - Grid(isoui) + #Grid(isoui) Grid(isoui, @lift(dashboard($isoo, session))) end @@ -24,7 +24,7 @@ function isocreator() pdbid = TextField("") steps = StylableSlider(1:1000, value=10) temperature = StylableSlider(-10:70, value=30) - optim = Dropdown(["Adam", "Nesterov"], index=2) + optim = Dropdown(["Adam", "Nesterov"], index=1) learnrate = StylableSlider(sort([logrange(1e-4, 1e-2, 10); 1e-3]), value=1e-3) regularization = StylableSlider(sort([logrange(1e-6, 1e-3, 10); 1e-4]), value=1e-4) nx = StylableSlider(2:100, value=10) @@ -111,7 +111,7 @@ function serve() return content(session) end - server = Bonito.get_server() - route!(server, "/" => app) + #server = Bonito.get_server() + #route!(server, "/" => app) return app end diff --git a/src/makie.jl b/src/makie.jl index 4a214d7..dbc897b 100644 --- a/src/makie.jl +++ b/src/makie.jl @@ -120,7 +120,7 @@ function dashboard(iso::Iso2, session=nothing) lines(fig[2, 1], losses, axis=(yscale=log10, limits=@lift((((1, max(length($losses), 2)), nothing))))) - scatter(fig[3, 1], chis, axis=(limits=@lift((1, $n, 0, 1)),)) + WGLMakie.scatter(fig[3, 1], chis, axis=(limits=@lift((1, $n, 0, 1)),)) frameselector = SliderGrid(fig[4, 1], (label="Data Frame", range=@lift(1:$n), startvalue=n) diff --git a/src/models.jl b/src/models.jl index 5302764..5f0baec 100644 --- a/src/models.jl +++ b/src/models.jl @@ -52,7 +52,7 @@ end `features` allows to pass a featurizer as preprocessor, `activation` determines the activation function for each but the last layer `lastactivation` can be used to modify the last layers activation function """ -function pairnet(n::Int=22; layers=3, features=identity, activation=Flux.sigmoid, lastactivation=identity, nout=1, layernorm=false) +function pairnet(n::Int=22; layers=3, features=identity, activation=Flux.sigmoid, lastactivation=identity, nout=1, layernorm=true) float32(x) = Float32.(x) nn = Flux.Chain( #float32,