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 981.45 seconds (6.166 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: 2184423849188
    Reset training subject: 2204697223707
    Adding measurement 534a8e2a to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.587966315448284;dx=-1.8308575602473425E-7
    New Minimum: 9.587966315448284 > 9.587966196238995
    WOLFE (weak): th(2.154434690031884)=9.587966196238995; dx=-1.8248141366609635E-7 evalInputDelta=1.1920928955078125E-7
    New Minimum: 9.587966196238995 > 9.587965615093708
    WOLFE (weak): th(4.308869380063768)=9.587965615093708; dx=-1.8249702956956303E-7 evalInputDelta=7.003545761108398E-7
    New Minimum: 9.587965615093708 > 9.587962970137596
    WOLFE (weak): th(12.926608140191302)=9.587962970137596; dx=-1.8250118674687401E-7 evalInputDelta=3.345310688018799E-6
    New Minimum: 9.587962970137596 > 9.587952516973019
    WOLFE (weak): th(51.70643256076521)=9.587952516973019; dx=-1.8249878217751243E-7 evalInputDelta=1.379847526550293E-5
    New Minimum: 9.587952516973019 > 9.587897427380085
    WOLFE (weak): th(258.53216280382605)=9.587897427380085; dx=-1.824967474155524E-7 evalInputDelta=6.888806819915771E-5
    New Minimum: 9.587897427380085 > 9.587553054094315
    WOLFE (weak): th(1551.1929768229563)=9.587553054094315; dx=-1.8250011232683887E-7 evalInputDelta=4.13261353969574E-4
    New Minimum: 9.587553054094315 > 9.585072956979275
    WOLFE (weak): th(10858.350837760694)=9.585072956979275; dx=-1.8237993654202697E-7 evalInputDelta=0.0028933584690093994
    New Minimum: 9.585072956979275 > 9.564856752753258
    WOLFE (weak): th(86866.80670208555)=9.564856752753258; dx=-1.8170306876858772E-7 evalInputDelta=0.023109562695026398
    New Minimum: 9.564856752753258 > 9.383536152541637
    WOLFE (weak): th(781801.26031877)=9.383536152541637; dx=-1.7458420787527825E-7 evalInputDelta=0.20443016290664673
    New Minimum: 9.383536152541637 > 8.077377259731293
    END: th(7818012.6031877)=8.077377259731293; dx=-8.442934198518605E-8 evalInputDelta=1.5105890557169914
    Fitness changed from 9.587966315448284 to 8.077377259731293
    Iteration 1 complete. Error: 8.077377259731293 Total: 280.6562;

...skipping 6182 bytes...

    776693344116 Total: 102.5845; Orientation: 1.8849; Line Search: 79.1898
    Adding measurement 31dda171 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.759e+03, gradient 1.160e-04, dot -0.361; [b871c19d-f479-4dbf-be76-7c41b26f8c70 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.04228776693344116, 6.413524627685547, 8.077377259731293, 9.587966315448284
    LBFGS Accumulation History: 3 points
    Removed measurement 31dda171 to history. Total: 3
    th(0)=0.04228776693344116;dx=-1.3202577832792093E-8
    New Minimum: 0.04228776693344116 > -0.24957729876041412
    END: th(3.7800000000000015E7)=-0.24957729876041412; dx=-4.096579371894156E-11 evalInputDelta=0.2918650656938553
    Fitness changed from 0.04228776693344116 to -0.24957729876041412
    Iteration 9 complete. Error: -0.24957729876041412 Total: 61.0730; Orientation: 1.9029; Line Search: 40.3128
    Adding measurement 28bdf4c1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.428e+03, gradient 8.441e-05, dot -0.394; [b871c19d-f479-4dbf-be76-7c41b26f8c70 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.24957729876041412, 6.413524627685547, 8.077377259731293, 9.587966315448284
    LBFGS Accumulation History: 3 points
    Removed measurement 28bdf4c1 to history. Total: 3
    th(0)=-0.24957729876041412;dx=-7.123939554107332E-9
    New Minimum: -0.24957729876041412 > -0.30666080117225647
    WOLF (strong): th(8.143763128320524E7)=-0.30666080117225647; dx=2.8693876515763997E-9 evalInputDelta=0.057083502411842346
    New Minimum: -0.30666080117225647 > -0.4472897797822952
    END: th(4.071881564160262E7)=-0.4472897797822952; dx=-1.1897676376889458E-9 evalInputDelta=0.1977124810218811
    Fitness changed from -0.24957729876041412 to -0.4472897797822952
    Iteration 10 complete. Error: -0.4472897797822952 Total: 85.3403; Orientation: 1.8814; Line Search: 62.6338
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/8b99a4eb-73e7-4a0b-b5f3-aea2099a8b90.jpg)
    
    Final threshold in iteration 11: -0.4472897797822952 (> -Infinity) after 981.450s (< 3600.000s)
    

Returns:

    -0.4472897797822952