Giter VIP home page Giter VIP logo

Comments (8)

Jutho avatar Jutho commented on May 20, 2024

I am happy to accept a PR, but I would just make a separate branch in the if for the case numfg>10 and print out a warning indeed.

from optimkit.jl.

ArtemStrashko avatar ArtemStrashko commented on May 20, 2024

Hi, it seems I have exactly the same issue and in my case it would be useful if the optimizer returned something (e.g., just an initial guess x_0). Is there some simple way to force it to stop bisecting after a few attempts and give up (just returning an initial condition)?
Thank you.

from optimkit.jl.

Jutho avatar Jutho commented on May 20, 2024

I will try to look at this soon; the linesearch logic should be changed somewhat to allow for a graceful return indeed.

from optimkit.jl.

maartenvd avatar maartenvd commented on May 20, 2024

out of curiosity, is there a small minimal example somewhere of bisect looping?

from optimkit.jl.

ArtemStrashko avatar ArtemStrashko commented on May 20, 2024

Oh, I am afraid not really right now. I am developing an MPS-like architecture for image classification and when I optimize MPS tensors one by one, sometimes optimizations just gets stuck on some tensor and does not proceed to the next tensors.

from optimkit.jl.

ArtemStrashko avatar ArtemStrashko commented on May 20, 2024

Hi, if I just download OptimKit.jl and then add this condition numfg>10 as suggested by @marius311, could you please suggest how I then can use it? If I just include a line include("../../OptimKit/src/OptimKit.jl"), I then get an error UndefVarError: ConjugateGradient not defined. But if I also add another line include("../../OptimKit/src/gd.jl"), I get another error LoadError: UndefVarError: AbstractLineSearch not defined. Finally, if I include the following lines

using Printf
include("../../OptimKit/src/OptimKit.jl")
include("../../OptimKit/src/linesearches.jl")
include("../../OptimKit/src/gd.jl")

I get this error: LoadError: UndefVarError: OptimizationAlgorithm not defined (and I always get WARNING: replacing module OptimKit, even though I ran Pkg.rm("OptimKit.jl) before).
Thank you.

from optimkit.jl.

marius311 avatar marius311 commented on May 20, 2024

One hack is just to do

using OptimKit
@eval OptimKit function bisect(iter::HagerZhangLineSearchIterator, a::LineSearchPoint, b::LineSearchPoint)
  # modified body here...
end

Another is you could pkg> dev --local OptimKit and edit the files directly.

from optimkit.jl.

ArtemStrashko avatar ArtemStrashko commented on May 20, 2024

Thank you @marius311! I use the first approach (with @eval). Sorry for my ignorance, but how should I proceed with the second approach? I mean, I execute pkg> dev --local OptimKit, but what's next? One part of an output of the previous command is OptimKit v0.3.1 ⇒ v0.3.2 dev/OptimKit, but when I cd to \dev, I cannot find OptimKit there.
Thank you!

from optimkit.jl.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.