Skip to content

Commit 44a3055

Browse files
authored
Replace epsilon with epsilon / 2 (#83)
* Replace epsilon with epsilon / 2 * Patch version * Fix tutorial
1 parent b9f4f69 commit 44a3055

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

CITATION.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ @misc{InferOpt.jl
22
author = {Guillaume Dalle, Léo Baty, Louis Bouvier and Axel Parmentier},
33
title = {InferOpt.jl},
44
url = {https://github.com/axelparmentier/InferOpt.jl},
5-
version = {v0.5.0},
5+
version = {v0.5.1},
66
year = {2023},
77
month = {7}
88
}

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "InferOpt"
22
uuid = "4846b161-c94e-4150-8dac-c7ae193c601f"
33
authors = ["Guillaume Dalle", "Léo Baty", "Louis Bouvier", "Axel Parmentier"]
4-
version = "0.5.0"
4+
version = "0.5.1"
55

66
[deps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

docs/Manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ version = "0.4.10"
407407
deps = ["ChainRulesCore", "LinearAlgebra", "Random", "Statistics", "StatsBase", "ThreadsX"]
408408
path = ".."
409409
uuid = "4846b161-c94e-4150-8dac-c7ae193c601f"
410-
version = "0.5.0-DEV"
410+
version = "0.5.1"
411411

412412
[deps.InferOpt.extensions]
413413
InferOptFrankWolfeExt = "DifferentiableFrankWolfe"

examples/tutorial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Here is the crucial part where InferOpt.jl intervenes: the choice of a clever lo
9696
- evaluate the quality of our model based on the paths that it recommends
9797
=#
9898

99-
layer = PerturbedMultiplicative(linear_maximizer; ε=1.0, nb_samples=5);
99+
layer = PerturbedMultiplicative(linear_maximizer; ε=0.1, nb_samples=5);
100100
loss = FenchelYoungLoss(layer);
101101

102102
#=

src/imitation/fenchel_young_loss.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function fenchel_young_F_and_first_part_of_grad(
105105
perturbed::PerturbedMultiplicative, θ::AbstractArray, Z::AbstractArray; kwargs...
106106
)
107107
(; maximizer, ε) = perturbed
108-
eZ = exp.(ε .* Z .- ε^2)
108+
eZ = exp.(ε .* Z .- ε^2 ./ 2)
109109
θ_perturbed = θ .* eZ
110110
y = maximizer(θ_perturbed; kwargs...)
111111
F = dot(θ_perturbed, y)

src/perturbed/multiplicative.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function perturb_and_optimize(
5252
perturbed::PerturbedMultiplicative, θ::AbstractArray, Z::AbstractArray; kwargs...
5353
)
5454
(; maximizer, ε) = perturbed
55-
θ_perturbed = θ .* exp.(ε .* Z .- ε^2)
55+
θ_perturbed = θ .* exp.(ε .* Z .- ε^2 ./ 2)
5656
y = maximizer(θ_perturbed; kwargs...)
5757
return y
5858
end

0 commit comments

Comments
 (0)