diff --git a/test/inference/repgradelbo_distributionsad.jl b/test/inference/repgradelbo_distributionsad.jl index a5cbd6f4..cae55d93 100644 --- a/test/inference/repgradelbo_distributionsad.jl +++ b/test/inference/repgradelbo_distributionsad.jl @@ -14,7 +14,6 @@ end @testset "$(modelname) $(objname) $(realtype) $(adbackname)" for realtype in [Float64, Float32], (modelname, modelconstr) in Dict(:Normal => normal_meanfield), - n_montecarlo in [10], (objname, objective) in Dict( :RepGradELBOClosedFormEntropy => RepGradELBO(n_montecarlo), :RepGradELBOStickingTheLanding => @@ -31,6 +30,7 @@ end T = 1000 η = 1e-3 opt = Optimisers.Descent(realtype(η)) + n_montecarlo = 10 # For small enough η, the error of SGD, Δλ, is bounded as # Δλ ≤ ρ^T Δλ0 + O(η), diff --git a/test/inference/repgradelbo_locationscale.jl b/test/inference/repgradelbo_locationscale.jl index 637750a9..10c3a4ad 100644 --- a/test/inference/repgradelbo_locationscale.jl +++ b/test/inference/repgradelbo_locationscale.jl @@ -15,7 +15,6 @@ end [Float64, Float32], (modelname, modelconstr) in Dict(:Normal => normal_meanfield, :Normal => normal_fullrank), - n_montecarlo in [10], (objname, objective) in Dict( :RepGradELBOClosedFormEntropy => RepGradELBO(n_montecarlo), :RepGradELBOStickingTheLanding => @@ -32,6 +31,7 @@ end T = 1000 η = 1e-3 opt = Optimisers.Descent(realtype(η)) + n_montecarlo = 10 # For small enough η, the error of SGD, Δλ, is bounded as # Δλ ≤ ρ^T Δλ0 + O(η), diff --git a/test/inference/repgradelbo_locationscale_bijectors.jl b/test/inference/repgradelbo_locationscale_bijectors.jl index 223e2f10..aa51ea07 100644 --- a/test/inference/repgradelbo_locationscale_bijectors.jl +++ b/test/inference/repgradelbo_locationscale_bijectors.jl @@ -15,7 +15,6 @@ end [Float64, Float32], (modelname, modelconstr) in Dict(:NormalLogNormalMeanField => normallognormal_meanfield), - n_montecarlo in [10], (objname, objective) in Dict( :RepGradELBOClosedFormEntropy => RepGradELBO(n_montecarlo), :RepGradELBOStickingTheLanding => @@ -32,6 +31,7 @@ end T = 1000 η = 1e-3 opt = Optimisers.Descent(realtype(η)) + n_montecarlo = 10 b = Bijectors.bijector(model) b⁻¹ = inverse(b) diff --git a/test/inference/scoregradelbo_distributionsad.jl b/test/inference/scoregradelbo_distributionsad.jl index 07a83e9e..34cceb92 100644 --- a/test/inference/scoregradelbo_distributionsad.jl +++ b/test/inference/scoregradelbo_distributionsad.jl @@ -14,7 +14,6 @@ end @testset "$(modelname) $(objname) $(realtype) $(adbackname)" for realtype in [Float64, Float32], (modelname, modelconstr) in Dict(:Normal => normal_meanfield), - n_montecarlo in [10], (objname, objective) in Dict(:ScoreGradELBO => ScoreGradELBO(n_montecarlo)), (adbackname, adtype) in AD_scoregradelbo_distributionsad @@ -27,6 +26,7 @@ end T = 1000 η = 1e-4 opt = Optimisers.Descent(realtype(η)) + n_montecarlo = 10 # For small enough η, the error of SGD, Δλ, is bounded as # Δλ ≤ ρ^T Δλ0 + O(η), diff --git a/test/inference/scoregradelbo_locationscale.jl b/test/inference/scoregradelbo_locationscale.jl index dcf9d7b8..74d7a69e 100644 --- a/test/inference/scoregradelbo_locationscale.jl +++ b/test/inference/scoregradelbo_locationscale.jl @@ -15,7 +15,6 @@ end [Float64, Float32], (modelname, modelconstr) in Dict(:Normal => normal_meanfield, :Normal => normal_fullrank), - n_montecarlo in [10], (objname, objective) in Dict(:ScoreGradELBO => ScoreGradELBO(n_montecarlo)), (adbackname, adtype) in AD_scoregradelbo_locationscale @@ -28,6 +27,7 @@ end T = 1000 η = 1e-4 opt = Optimisers.Descent(realtype(η)) + n_montecarlo = 10 # For small enough η, the error of SGD, Δλ, is bounded as # Δλ ≤ ρ^T Δλ0 + O(η), diff --git a/test/inference/scoregradelbo_locationscale_bijectors.jl b/test/inference/scoregradelbo_locationscale_bijectors.jl index e2a8b132..10f72199 100644 --- a/test/inference/scoregradelbo_locationscale_bijectors.jl +++ b/test/inference/scoregradelbo_locationscale_bijectors.jl @@ -15,7 +15,6 @@ end [Float64, Float32], (modelname, modelconstr) in Dict(:NormalLogNormalMeanField => normallognormal_meanfield), - n_montecarlo in [10], (objname, objective) in Dict(:ScoreGradELBO => ScoreGradELBO(n_montecarlo)), (adbackname, adtype) in AD_scoregradelbo_locationscale_bijectors @@ -28,6 +27,7 @@ end T = 1000 η = 1e-4 opt = Optimisers.Descent(realtype(η)) + n_montecarlo = 10 b = Bijectors.bijector(model) b⁻¹ = inverse(b)