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

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:88 executed in 1418.53 seconds (10.828 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: 6517349665381
    Reset training subject: 6528575271664
    Adding measurement 19694bc8 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.7370964884757996;dx=-1.264565640428829E-7
    New Minimum: 3.7370964884757996 > 3.737096458673477
    WOLFE (weak): th(2.154434690031884)=3.737096458673477; dx=-1.2615960929278612E-7 evalInputDelta=2.9802322387695312E-8
    New Minimum: 3.737096458673477 > 3.737095817923546
    WOLFE (weak): th(4.308869380063768)=3.737095817923546; dx=-1.2616807638325073E-7 evalInputDelta=6.705522537231445E-7
    New Minimum: 3.737095817923546 > 3.7370938509702682
    WOLFE (weak): th(12.926608140191302)=3.7370938509702682; dx=-1.2616592740789665E-7 evalInputDelta=2.637505531311035E-6
    New Minimum: 3.7370938509702682 > 3.7370868921279907
    WOLFE (weak): th(51.70643256076521)=3.7370868921279907; dx=-1.2616095168661245E-7 evalInputDelta=9.59634780883789E-6
    New Minimum: 3.7370868921279907 > 3.7370490580797195
    WOLFE (weak): th(258.53216280382605)=3.7370490580797195; dx=-1.2616172768567463E-7 evalInputDelta=4.743039608001709E-5
    New Minimum: 3.7370490580797195 > 3.736811399459839
    WOLFE (weak): th(1551.1929768229563)=3.736811399459839; dx=-1.2616481366759836E-7 evalInputDelta=2.8508901596069336E-4
    New Minimum: 3.736811399459839 > 3.7351014763116837
    WOLFE (weak): th(10858.350837760694)=3.7351014763116837; dx=-1.2615351491077195E-7 evalInputDelta=0.0019950121641159058
    New Minimum: 3.7351014763116837 > 3.72114098072052
    WOLFE (weak): th(86866.80670208555)=3.72114098072052; dx=-1.2605741118383136E-7 evalInputDelta=0.01595550775527954
    New Minimum: 3.72114098072052 > 3.5939878076314926
    WOLFE (weak): th(781801.26031877)=3.5939878076314926; dx=-1.2483449016282755E-7 evalInputDelta=0.14310868084430695
    New Minimum: 3.5939878076314926 > 2.45952907204628
    END: th(7818012.6031877)=2.45952907204628; dx=-9.353624753059099E-8 evalInputDelta=1.2775674164295197
    Fitness changed from 3.7370964884757996 to 2.45952907204628
    Iteration 1 complete. Error: 2.45952907204628 Total

...skipping 24279 bytes...

    8219862825907E7)=-2.5577263366431; dx=-9.220245963313612E-11 evalInputDelta=0.0022715386003255844
    Fitness changed from -2.555454798042774 to -2.5577263366431
    Iteration 28 complete. Error: -2.5577263366431 Total: 33.6343; Orientation: 1.5336; Line Search: 21.1060
    Adding measurement 7e93b068 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.066e+03, gradient 9.538e-06, dot -0.453; [8b2dc31f-a72d-4264-9fa6-4b01e1c4f9d0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.5577263366431, 0.8478079289197922, 2.45952907204628, 3.7370964884757996
    LBFGS Accumulation History: 3 points
    Removed measurement 7e93b068 to history. Total: 3
    th(0)=-2.5577263366431;dx=-9.088030446296484E-11
    New Minimum: -2.5577263366431 > -2.5606546252965927
    END: th(3.9172359465771474E7)=-2.5606546252965927; dx=-7.88397500836178E-11 evalInputDelta=0.0029282886534929276
    Fitness changed from -2.5577263366431 to -2.5606546252965927
    Iteration 29 complete. Error: -2.5606546252965927 Total: 34.3964; Orientation: 1.5468; Line Search: 21.5965
    Adding measurement 63dba5a9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.140e+03, gradient 9.024e-06, dot -0.478; [8b2dc31f-a72d-4264-9fa6-4b01e1c4f9d0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.5606546252965927, 0.8478079289197922, 2.45952907204628, 3.7370964884757996
    LBFGS Accumulation History: 3 points
    Removed measurement 63dba5a9 to history. Total: 3
    th(0)=-2.5606546252965927;dx=-8.133567049240447E-11
    New Minimum: -2.5606546252965927 > -2.5659714452922344
    END: th(8.43942901234569E7)=-2.5659714452922344; dx=-6.758250266447566E-11 evalInputDelta=0.005316819995641708
    Fitness changed from -2.5606546252965927 to -2.5659714452922344
    Iteration 30 complete. Error: -2.5659714452922344 Total: 35.1870; Orientation: 1.5771; Line Search: 23.6985
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/e5b6c869-d722-4d14-8342-12e4024213fd.jpg)
    
    Final threshold in iteration 31: -2.5659714452922344 (> -Infinity) after 1418.534s (< 3600.000s)
    

Returns:

    -2.5659714452922344