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:75 executed in 1004.49 seconds (11.236 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 1153864441398100
    Reset training subject: 1153872631683700
    Adding measurement 2aa5bd48 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.240847873301505;dx=-2.8915684583583537E-5
    New Minimum: 5.240847873301505 > 5.240820678856521
    WOLFE (weak): th(2.154434690031884)=5.240820678856521; dx=-2.891520028272685E-5 evalInputDelta=2.719444498477941E-5
    New Minimum: 5.240820678856521 > 5.240793663782535
    WOLFE (weak): th(4.308869380063768)=5.240793663782535; dx=-2.8914840689245335E-5 evalInputDelta=5.420951897061599E-5
    New Minimum: 5.240793663782535 > 5.2406853259814685
    WOLFE (weak): th(12.926608140191302)=5.2406853259814685; dx=-2.891808369328511E-5 evalInputDelta=1.6254732003684325E-4
    New Minimum: 5.2406853259814685 > 5.24019795718848
    WOLFE (weak): th(51.70643256076521)=5.24019795718848; dx=-2.8913526770072524E-5 evalInputDelta=6.499161130255615E-4
    New Minimum: 5.24019795718848 > 5.237600689466628
    WOLFE (weak): th(258.53216280382605)=5.237600689466628; dx=-2.8875465185755344E-5 evalInputDelta=0.0032471838348770987
    New Minimum: 5.237600689466628 > 5.221434118185309
    WOLFE (weak): th(1551.1929768229563)=5.221434118185309; dx=-2.8636980819394966E-5 evalInputDelta=0.019413755116196363
    New Minimum: 5.221434118185309 > 5.108774091574023
    WOLFE (weak): th(10858.350837760694)=5.108774091574023; dx=-2.6997827004770173E-5 evalInputDelta=0.13207378172748196
    New Minimum: 5.108774091574023 > 4.413772846843677
    END: th(86866.80670208555)=4.413772846843677; dx=-1.6322068576395895E-5 evalInputDelta=0.8270750264578286
    Fitness changed from 5.240847873301505 to 4.413772846843677
    Iteration 1 complete. Error: 4.413772846843677 Total: 99.2138; Orientation: 0.0071; Line Search: 74.4861
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/fd9244ab-9427-47da-b232-9e1aa34aed0f.jpg)
    
    Adding measurement 401e02b4 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.413772846843677;dx=-1.2919398232166491E-5
    New Minimum: 

...skipping 23941 bytes...

    ding measurement 2c674d58 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.609e+03, gradient 2.945e-04, dot -0.498; [baaf49c6-b691-4d40-bf88-9946dd8319c1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2900186140083263, 0.27065700677458526, 0.2498007973180865, 0.24499030240653294
    LBFGS Accumulation History: 3 points
    Removed measurement 36e409e0 to history. Total: 4
    th(0)=0.24499030240653294;dx=-8.673767154981058E-8
    Armijo: th(1.044596252420573E7)=0.3479129170890836; dx=1.7128233994925956E-8 evalInputDelta=-0.10292261468255068
    Armijo: th(5222981.262102865)=0.2470389154010412; dx=-9.292321266768239E-10 evalInputDelta=-0.0020486129945082587
    New Minimum: 0.24499030240653294 > 0.21652276986646404
    END: th(1740993.7540342882)=0.21652276986646404; dx=-2.1462215051298684E-8 evalInputDelta=0.028467532540068896
    Fitness changed from 0.24499030240653294 to 0.21652276986646404
    Iteration 29 complete. Error: 0.21652276986646404 Total: 41.8838; Orientation: 0.1970; Line Search: 33.3348
    Adding measurement 39374689 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.810e+03, gradient 1.882e-04, dot -0.773; [baaf49c6-b691-4d40-bf88-9946dd8319c1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.27065700677458526, 0.2498007973180865, 0.24499030240653294, 0.21652276986646404
    LBFGS Accumulation History: 3 points
    Removed measurement 78eafad to history. Total: 4
    th(0)=0.21652276986646404;dx=-3.540979310705818E-8
    New Minimum: 0.21652276986646404 > 0.19989724585859986
    END: th(3750857.3388203075)=0.19989724585859986; dx=-2.1466368487897744E-8 evalInputDelta=0.016625524007864184
    Fitness changed from 0.21652276986646404 to 0.19989724585859986
    Iteration 30 complete. Error: 0.19989724585859986 Total: 25.8114; Orientation: 0.2018; Line Search: 17.4923
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/6a6924b2-3d77-46a0-be04-581d18ed81fe.jpg)
    
    Final threshold in iteration 31: 0.19989724585859986 (> -Infinity) after 1004.478s (< 3600.000s)
    

Returns:

    0.19989724585859986