Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 971.00 seconds (8.792 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: 9567372824055
    Reset training subject: 9586337150851
    Adding measurement 3b8e3c26 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.453648865222931;dx=-1.0813369583306737E-7
    New Minimum: 3.453648865222931 > 3.4536485075950623
    WOLFE (weak): th(2.154434690031884)=3.4536485075950623; dx=-1.0813821723684728E-7 evalInputDelta=3.5762786865234375E-7
    New Minimum: 3.4536485075950623 > 3.4536481499671936
    WOLFE (weak): th(4.308869380063768)=3.4536481499671936; dx=-1.0814373723707632E-7 evalInputDelta=7.152557373046875E-7
    New Minimum: 3.4536481499671936 > 3.453646808862686
    WOLFE (weak): th(12.926608140191302)=3.453646808862686; dx=-1.0813677754792777E-7 evalInputDelta=2.0563602447509766E-6
    New Minimum: 3.453646808862686 > 3.4536402821540833
    WOLFE (weak): th(51.70643256076521)=3.4536402821540833; dx=-1.0813741206849894E-7 evalInputDelta=8.58306884765625E-6
    New Minimum: 3.4536402821540833 > 3.453605607151985
    WOLFE (weak): th(258.53216280382605)=3.453605607151985; dx=-1.081351295551719E-7 evalInputDelta=4.3258070945739746E-5
    New Minimum: 3.453605607151985 > 3.4533896446228027
    WOLFE (weak): th(1551.1929768229563)=3.4533896446228027; dx=-1.0663470505958839E-7 evalInputDelta=2.5922060012817383E-4
    New Minimum: 3.4533896446228027 > 3.4518335312604904
    WOLFE (weak): th(10858.350837760694)=3.4518335312604904; dx=-1.0670888572726339E-7 evalInputDelta=0.0018153339624404907
    New Minimum: 3.4518335312604904 > 3.4391581267118454
    WOLFE (weak): th(86866.80670208555)=3.4391581267118454; dx=-1.076309096920147E-7 evalInputDelta=0.01449073851108551
    New Minimum: 3.4391581267118454 > 3.3259316980838776
    WOLFE (weak): th(781801.26031877)=3.3259316980838776; dx=-1.0302992111617181E-7 evalInputDelta=0.12771716713905334
    New Minimum: 3.3259316980838776 > 2.4815981686115265
    END: th(7818012.6031877)=2.4815981686115265; dx=-5.4814509773752035E-8 evalInputDelta=0.9720506966114044
    Fitness changed from 3.453648865222931 to 2.4815981686115265
    Iteration 1 complete. Error: 2.481598

...skipping 6056 bytes...

    e Search: 42.1590
    Adding measurement 2cccd17f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.173e+03, gradient 7.568e-05, dot -0.518; [dbe39ad4-3131-4cf9-90e5-43448ecc80c8 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.8698077946901321, 1.4935402572154999, 2.4815981686115265, 3.453648865222931
    LBFGS Accumulation History: 3 points
    Removed measurement 2cccd17f to history. Total: 3
    th(0)=-0.8698077946901321;dx=-5.8825175566218485E-9
    Armijo: th(1.0080000000000003E8)=-0.801503375172615; dx=1.59922725184253E-9 evalInputDelta=-0.06830441951751709
    New Minimum: -0.8698077946901321 > -0.9568649679422379
    WOLF (strong): th(5.0400000000000015E7)=-0.9568649679422379; dx=4.200977984300908E-10 evalInputDelta=0.08705717325210571
    END: th(1.6800000000000004E7)=-0.9563884288072586; dx=-2.5470668634656635E-9 evalInputDelta=0.08658063411712646
    Fitness changed from -0.8698077946901321 to -0.9568649679422379
    Iteration 9 complete. Error: -0.9568649679422379 Total: 102.1430; Orientation: 1.9898; Line Search: 80.7254
    Adding measurement 78f9e02a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.931e+03, gradient 8.406e-05, dot -0.465; [dbe39ad4-3131-4cf9-90e5-43448ecc80c8 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.9568649679422379, 1.4935402572154999, 2.4815981686115265, 3.453648865222931
    LBFGS Accumulation History: 3 points
    Removed measurement 78f9e02a to history. Total: 3
    th(0)=-0.9568649679422379;dx=-7.065262166306946E-9
    New Minimum: -0.9568649679422379 > -1.1068716049194336
    END: th(3.6194502792535655E7)=-1.1068716049194336; dx=-4.496845897554756E-10 evalInputDelta=0.15000663697719574
    Fitness changed from -0.9568649679422379 to -1.1068716049194336
    Iteration 10 complete. Error: -1.1068716049194336 Total: 63.8938; Orientation: 1.8387; Line Search: 41.4961
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/11a0f19a-5d86-4318-9630-ea04ad8b2991.jpg)
    
    Final threshold in iteration 11: -1.1068716049194336 (> -Infinity) after 971.000s (< 3600.000s)
    

Returns:

    -1.1068716049194336