We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The API used to allow the OptimizationFunction to return multiple objects where the first one needs to be the loss value.
https://github.com/SciML/SciMLBase.jl/blob/master/src/scimlfunctions.jl#L1813-L1815
This MWE shows that all of the outputs of the optimization function are passed down to the AD backend.
julia> using OptimizationOptimJL, Zygote julia> f(x, p) = sum(x), (;) f (generic function with 1 method) julia> optf = OptimizationFunction(f, AutoZygote()) julia> optprob = OptimizationProblem(optf, rand(4)) OptimizationProblem. In-place: true u0: 4-element Vector{Float64}: 0.7025958336860735 0.5420026600629022 0.6272098967494587 0.1342462910974671 julia> optsol = solve(optprob, Optim.BFGS()) ERROR: Output should be scalar; gradients are not defined for output (2.0060546815959017, NamedTuple()) Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] sensitivity(y::Tuple{Float64, @NamedTuple{}}) @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface.jl:114 [3] gradient(::Function, ::Vector{Float64}, ::Vararg{Any}) @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface.jl:148 [4] gradient @ ~/.julia/packages/DifferentiationInterface/QK77S/ext/DifferentiationInterfaceZygoteExt/DifferentiationInterfaceZygoteExt.jl:100 [inlined]
The text was updated successfully, but these errors were encountered:
update comments, fix BFGS. Looks like API is broken SciML/Optimizatio…
bf0d426
…n.jl#839
#835 (comment) suggests that this is no longer supported.
Sorry, something went wrong.
Thanks, closing this issue.
No branches or pull requests
The API used to allow the OptimizationFunction to return multiple objects where the first one needs to be the loss value.
https://github.com/SciML/SciMLBase.jl/blob/master/src/scimlfunctions.jl#L1813-L1815
This MWE shows that all of the outputs of the optimization function are passed down to the AD backend.
The text was updated successfully, but these errors were encountered: