Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

Code from BasicOptimizer.scala:88 executed in 633.49 seconds (5.898 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: 1079408596054
    Reset training subject: 1086572659146
    Adding measurement 23feec9 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.956336736679077;dx=-3.161432386798446E-7
    New Minimum: 8.956336736679077 > 8.956335470080376
    WOLFE (weak): th(2.154434690031884)=8.956335470080376; dx=-3.144330947250389E-7 evalInputDelta=1.2665987014770508E-6
    New Minimum: 8.956335470080376 > 8.956333227455616
    WOLFE (weak): th(4.308869380063768)=8.956333227455616; dx=-3.144426537686877E-7 evalInputDelta=3.509223461151123E-6
    New Minimum: 8.956333227455616 > 8.956325054168701
    WOLFE (weak): th(12.926608140191302)=8.956325054168701; dx=-3.145677132983376E-7 evalInputDelta=1.1682510375976562E-5
    New Minimum: 8.956325054168701 > 8.956290006637573
    WOLFE (weak): th(51.70643256076521)=8.956290006637573; dx=-3.1449457362392873E-7 evalInputDelta=4.673004150390625E-5
    New Minimum: 8.956290006637573 > 8.956102579832077
    WOLFE (weak): th(258.53216280382605)=8.956102579832077; dx=-3.142526801160878E-7 evalInputDelta=2.3415684700012207E-4
    New Minimum: 8.956102579832077 > 8.95493320375681
    WOLFE (weak): th(1551.1929768229563)=8.95493320375681; dx=-3.1434273749422834E-7 evalInputDelta=0.0014035329222679138
    New Minimum: 8.95493320375681 > 8.94652783125639
    WOLFE (weak): th(10858.350837760694)=8.94652783125639; dx=-3.133221214700129E-7 evalInputDelta=0.00980890542268753
    New Minimum: 8.94652783125639 > 8.878665179014206
    WOLFE (weak): th(86866.80670208555)=8.878665179014206; dx=-3.0595421860110483E-7 evalInputDelta=0.07767155766487122
    New Minimum: 8.878665179014206 > 8.328255228698254
    END: th(781801.26031877)=8.328255228698254; dx=-2.3704892487609005E-7 evalInputDelta=0.6280815079808235
    Fitness changed from 8.956336736679077 to 8.328255228698254
    Iteration 1 complete. Error: 8.328255228698254 Total: 96.5181; Orientation: 0.0107; Line Search: 75.6356
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/b9947692-094f-4bbd-bee1-5a8a883a70c7.jpg)
    
    Adding measurement f07e45a 

...skipping 15013 bytes...

     -1.0359481126070023 Total: 22.7427; Orientation: 0.2382; Line Search: 14.8556
    Adding measurement 33efefe7 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.643e+03, gradient 5.708e-05, dot -0.559; [b61819c5-ed26-443e-9a74-98c8ffcbf163 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0359481126070023, 7.406375452876091, 8.328255228698254, 8.956336736679077
    LBFGS Accumulation History: 3 points
    Removed measurement 33efefe7 to history. Total: 3
    th(0)=-1.0359481126070023;dx=-3.2404318526599836E-9
    New Minimum: -1.0359481126070023 > -1.1023779287934303
    END: th(1.2567535691852665E7)=-1.1023779287934303; dx=-1.2538150301863635E-9 evalInputDelta=0.06642981618642807
    Fitness changed from -1.0359481126070023 to -1.1023779287934303
    Iteration 19 complete. Error: -1.1023779287934303 Total: 22.9684; Orientation: 0.3489; Line Search: 15.4892
    Adding measurement 4adce370 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.518e+03, gradient 6.297e-05, dot -0.478; [b61819c5-ed26-443e-9a74-98c8ffcbf163 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1023779287934303, 7.406375452876091, 8.328255228698254, 8.956336736679077
    LBFGS Accumulation History: 3 points
    Removed measurement 4adce370 to history. Total: 3
    th(0)=-1.1023779287934303;dx=-3.951171452356607E-9
    New Minimum: -1.1023779287934303 > -1.1458675786852837
    WOLF (strong): th(2.7075934862741232E7)=-1.1458675786852837; dx=7.482978644294781E-10 evalInputDelta=0.04348964989185333
    New Minimum: -1.1458675786852837 > -1.1508844643831253
    END: th(1.3537967431370616E7)=-1.1508844643831253; dx=-3.286524572417287E-11 evalInputDelta=0.04850653558969498
    Fitness changed from -1.1023779287934303 to -1.1508844643831253
    Iteration 20 complete. Error: -1.1508844643831253 Total: 29.3932; Orientation: 0.2502; Line Search: 22.0076
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/6b795b73-7af9-49b2-9f9e-fb9a741a9db4.jpg)
    
    Final threshold in iteration 21: -1.1508844643831253 (> -Infinity) after 633.486s (< 3600.000s)
    

Returns:

    -1.1508844643831253