Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Code from BasicOptimizer.scala:88 executed in 360.11 seconds (5.248 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[Trainable], currentPoint)
      }
  
      override def onStepComplete(currentPoint: Step): Unit = {
        if (0 < logEvery && (0 == currentPoint.iteration % logEvery || currentPoint.iteration < logEvery)) {
          val image = currentImage()
          timelineAnimation += image
          val caption = "Iteration " + currentPoint.iteration
          out.p(caption + "\n" + out.jpg(image, caption))
        }
        BasicOptimizer.this.onStepComplete(trainable.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 4974691456628
    Reset training subject: 4978350415646
    Adding measurement 5d11547b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.9404574185609818;dx=-1.5596483032642945E-7
    New Minimum: 3.9404574185609818 > 3.940457299351692
    WOLFE (weak): th(2.154434690031884)=3.940457299351692; dx=-1.5596451314535232E-7 evalInputDelta=1.1920928955078125E-7
    New Minimum: 3.940457299351692 > 3.9404570162296295
    WOLFE (weak): th(4.308869380063768)=3.9404570162296295; dx=-1.559646702994854E-7 evalInputDelta=4.023313522338867E-7
    New Minimum: 3.9404570162296295 > 3.9404565393924713
    WOLFE (weak): th(12.926608140191302)=3.9404565393924713; dx=-1.559644928795793E-7 evalInputDelta=8.791685104370117E-7
    New Minimum: 3.9404565393924713 > 3.9404538571834564
    WOLFE (weak): th(51.70643256076521)=3.9404538571834564; dx=-1.5596476341568935E-7 evalInputDelta=3.56137752532959E-6
    New Minimum: 3.9404538571834564 > 3.940441608428955
    WOLFE (weak): th(258.53216280382605)=3.940441608428955; dx=-1.559609165960186E-7 evalInputDelta=1.5810132026672363E-5
    New Minimum: 3.940441608428955 > 3.940362513065338
    WOLFE (weak): th(1551.1929768229563)=3.940362513065338; dx=-1.5595721448221044E-7 evalInputDelta=9.490549564361572E-5
    New Minimum: 3.940362513065338 > 3.9397937208414078
    WOLFE (weak): th(10858.350837760694)=3.9397937208414078; dx=-1.5588218755098247E-7 evalInputDelta=6.636977195739746E-4
    New Minimum: 3.9397937208414078 > 3.9351902902126312
    WOLFE (weak): th(86866.80670208555)=3.9351902902126312; dx=-1.5491869829057677E-7 evalInputDelta=0.005267128348350525
    New Minimum: 3.9351902902126312 > 3.896772861480713
    WOLFE (weak): th(781801.26031877)=3.896772861480713; dx=-1.4650733881733802E-7 evalInputDelta=0.04368455708026886
    New Minimum: 3.896772861480713 > 3.8808130621910095
    END: th(7818012.6031877)=3.8808130621910095; dx=-7.603848810133322E-8 evalInputDelta=0.05964435636997223
    Fitness changed from 3.9404574185609818 to 3.8808130621910095
    Iteration 1 complete. Error: 3.880813062191

...skipping 9059 bytes...

    590262364305)=3.8485828638076782; dx=-1.0344933651955309E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.0018677149039661512)=3.8485828042030334; dx=-1.0344933637928784E-7 evalInputDelta=0.0
    Armijo: th(0.0019186525831652282)=3.8485828638076782; dx=-1.0344933648888354E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.0018931837435656896)=3.8485828042030334; dx=-1.0344933631284616E-7 evalInputDelta=0.0
    Armijo: th(0.001905918163365459)=3.8485828638076782; dx=-1.0344933662352728E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.0018995509534655741)=3.8485828042030334; dx=-1.034493362665222E-7 evalInputDelta=0.0
    Armijo: th(0.0019027345584155166)=3.8485828638076782; dx=-1.0344933654726046E-7 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(0.0019011427559405454)=3.8485828638076782; dx=-1.0344933655995055E-7 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(0.0019003468547030599)=3.8485828638076782; dx=-1.034493364689672E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.001899948904084317)=3.8485828042030334; dx=-1.0344933643260468E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019001478793936885)=3.8485828042030334; dx=-1.0344933649151195E-7 evalInputDelta=0.0
    Armijo: th(0.0019002473670483742)=3.8485828638076782; dx=-1.0344933647373255E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.0019001976232210314)=3.8485828042030334; dx=-1.0344933642293492E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019002224951347028)=3.8485828042030334; dx=-1.0344933651898449E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019002349310915385)=3.8485828042030334; dx=-1.0344933630721552E-7 evalInputDelta=0.0
    mu ~= nu (0.0019002349310915385): th(0.0)=3.8485828042030334
    Fitness changed from 3.8485828042030334 to 3.8485828042030334
    Static Iteration Total: 85.7304; Orientation: 0.0142; Line Search: 79.2380
    Iteration 5 failed. Error: 3.8485828042030334
    Previous Error: 0.0 -> 3.8485828042030334
    Optimization terminated 5
    Final threshold in iteration 5: 3.8485828042030334 (> -Infinity) after 360.110s (< 3600.000s)
    

Returns:

    3.8485828042030334