Skip to content

Commit d23fa12

Browse files
fix bounds translation (#499)
* fix bounds translation fixes #498 * patch release
1 parent 56f2102 commit d23fa12

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DiffEqFlux"
22
uuid = "aae7a2af-3d4f-5e19-a356-7da93b79d9d0"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "1.34.0"
4+
version = "1.34.1"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/train.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
function sciml_train(loss, θ, opt, adtype::DiffEqBase.AbstractADType = GalacticOptim.AutoZygote(), args...; kwargs...)
1+
function sciml_train(loss, θ, opt, adtype::DiffEqBase.AbstractADType = GalacticOptim.AutoZygote(), args...;
2+
lower_bounds = nothing, upper_bounds = nothing, kwargs...)
23
optf = GalacticOptim.OptimizationFunction((x, p) -> loss(x), adtype)
34
optfunc = GalacticOptim.instantiate_function(optf, θ, adtype, nothing)
4-
optprob = GalacticOptim.OptimizationProblem(optfunc, θ; kwargs...)
5+
optprob = GalacticOptim.OptimizationProblem(optfunc, θ; lb = lower_bounds, ub = upper_bounds, kwargs...)
56
GalacticOptim.solve(optprob, opt, args...; kwargs...)
67
end

0 commit comments

Comments
 (0)