Skip to content
New issue

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

Example with ADOLC #535

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Example with ADOLC #535

wants to merge 2 commits into from

Conversation

dhendryc
Copy link
Collaborator

Works well if n is small. But even for n=50, the gradient computation seems to be instable.
For n=500, it errors with

Vanilla Frank-Wolfe Algorithm.
MEMORY_MODE: FrankWolfe.InplaceEmphasis() STEPSIZE: Adaptive{Float64, Int64} EPSILON: 1.0e-7 MAXITERATION: 10000 TYPE: Float64
MOMENTUM: nothing GRADIENTTYPE: Nothing
LMO: FrankWolfe.ProbabilitySimplexOracle{Float64}
[ Info: In memory_mode memory iterates are written back into x0!
ADOL-C Warning: Branch switch detected in comparison (operator le_zero).
Forward sweep aborted! Retaping recommended!

-------------------------------------------------------------------------------------------------
  Type     Iteration         Primal           Dual       Dual Gap           Time         It/sec
-------------------------------------------------------------------------------------------------
     I             1   6.248921e+00   6.248921e+00   0.000000e+00   0.000000e+00            Inf
ADOL-C Warning: Branch switch detected in comparison (operator le_zero).
Forward sweep aborted! Retaping recommended!
  Last             1   6.248921e+00   6.248921e+00   0.000000e+00   9.962060e-01   1.003808e+00
-------------------------------------------------------------------------------------------------

@dhendryc dhendryc mentioned this pull request Dec 19, 2024
@dhendryc dhendryc linked an issue Dec 19, 2024 that may be closed by this pull request
@pokutta
Copy link
Member

pokutta commented Dec 20, 2024

we need to discuss with andrea et al

println("Automatic differentiation")

const tape_id = 1
ADOLC.derivative(f, zeros(n), :jac, tape_id=tape_id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe an explanation on the line here, since this call is not returning any variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ADOLC.jl example
3 participants