Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benchmarks/benchmark_multimodal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include("benchmark_utils.jl")
hparams = HyperParamsVanillaGan(;
data_size=100,
batch_size=1,
epochs=1e3,
epochs=1e4,
lr_dscr=1e-4,
lr_gen=1e-4,
dscr_steps=0,
Expand All @@ -29,7 +29,7 @@ include("benchmark_utils.jl")
train_vanilla_gan(dscr, gen, hparams)

hparams = HyperParams(;
samples=1000, K=100, epochs=100, η=1e-2, transform=noise_model
samples=200, K=10, epochs=1000, η=2e-2, transform=noise_model
)
#hparams = AutoAdaptativeHyperParams(;
# max_k=20, samples=1200, epochs=10000, η=1e-3, transform=noise_model
Expand Down Expand Up @@ -59,7 +59,7 @@ include("benchmark_utils.jl")
gen,
n_samples,
(-3:0.1:3),
(5:0.2:15),
(-8:0.2:8),
)

#@test js_divergence(hist1.weights, hist2.weights)/hparams.samples < 0.03
Expand Down
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ end;
@testset "adaptative_block_learning" begin
@testset "learning Normal(4.0f0, 2.0f0)" begin
nn = Chain(Dense(1, 7), elu, Dense(7, 13), elu, Dense(13, 7), elu, Dense(7, 1))
hparams = HyperParams(1000, 10, 400, 1e-2, Normal(0.0f0, 1.0f0))
hparams = HyperParams(1000, 10, 1000, 1e-2, Normal(0.0f0, 1.0f0))

function real_model(ϵ)
return rand(Normal(4.0f0, 2.0f0))
Expand All @@ -112,7 +112,7 @@ end;

@testset "learning uniform distribution (1,3)" begin
nn = Chain(Dense(1, 7), elu, Dense(7, 13), elu, Dense(13, 7), elu, Dense(7, 1))
hparams = HyperParams(100, 10, 1000, 1e-2, Normal(0.0f0, 1.0f0))
hparams = HyperParams(100, 10, 2000, 1e-2, Normal(0.0f0, 1.0f0))

function real_model(ϵ)
return rand(Float32) * 2 + 1
Expand All @@ -132,7 +132,7 @@ end;

@testset "learning Cauchy distribution" begin
nn = Chain(Dense(1, 7), elu, Dense(7, 13), elu, Dense(13, 7), elu, Dense(7, 1))
hparams = HyperParams(100, 10, 1000, 1e-3, Normal(0.0f0, 1.0f0))
hparams = HyperParams(100, 10, 2000, 1e-3, Normal(0.0f0, 1.0f0))

function real_model(ϵ)
return rand(Cauchy(1.0f0, 2.0f0))
Expand All @@ -152,7 +152,7 @@ end;

@testset "learning Bimodal Normal Distribution" begin
nn = Chain(Dense(1, 7), elu, Dense(7, 13), elu, Dense(13, 7), elu, Dense(7, 1))
hparams = HyperParams(100, 10, 2000, 1e-2, Normal(0.0f0, 1.0f0))
hparams = HyperParams(100, 10, 4000, 1e-2, Normal(0.0f0, 1.0f0))

function real_model(ϵ)
return rand(MixtureModel(Normal[Normal(5.0f0, 2.0f0), Normal(-1.0f0, 1.0f0)]))
Expand All @@ -173,7 +173,7 @@ end;
@testset "learning modal auto_adaptative_block_learning Normal(4.0f0, 2.0f0)" begin
nn = Chain(Dense(1, 7), elu, Dense(7, 13), elu, Dense(13, 7), elu, Dense(7, 1))
hparams = AutoAdaptativeHyperParams(;
max_k=10, samples=1000, epochs=400, η=1e-2, transform=Normal(0.0f0, 1.0f0)
max_k=10, samples=1000, epochs=1000, η=1e-2, transform=Normal(0.0f0, 1.0f0)
)

function real_model(ϵ)
Expand Down